Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-15

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 Zoffix joined #perl6
00:08 Zoffix .
00:09 Zoffix .tell melezhik your attempt to gather captures may be hindered with what I think is a bug: http://irclog.perlgeek.de/p​erl6/2016-09-15#i_13212176
00:09 yoleaux Zoffix: I'll pass your message to melezhik.
00:09 Zoffix m: my $m = 'a 123' ~~ /(\d\d\d)/; dd [$m.list];
00:09 camelia rakudo-moar 2c95f7: OUTPUT«[Match.new(ast => Any, list => (), hash => Map.new(()), orig => "a 123", to => 5, from => 2)]␤»
00:09 Zoffix m: my $input = '(\d\d\d)'; my $m = 'a 123' ~~ /<$input>/; dd [$m.list];
00:09 camelia rakudo-moar 2c95f7: OUTPUT«[]␤»
00:11 Zoffix RT: https://rt.perl.org/Ticket/Display.html?id=129271
00:13 infina joined #perl6
00:16 infina joined #perl6
00:17 ugexe m: my $input = q|(\d\d\d)|; my $rx = rx/<$input>/; my $m = "a 123 456" ~~ m:g/$rx/; dd [$m.list>>.Str];
00:17 camelia rakudo-moar 2c95f7: OUTPUT«["123", "456"]␤»
00:23 Actualeyes left #perl6
00:31 awwaiid joined #perl6
00:51 awwaiid I've arrived in STL for StrangeLoop!
00:53 labster joined #perl6
01:01 canopus joined #perl6
01:02 Pierre_ joined #perl6
01:06 tailgate is there a difference between the different ways you mar a function's return type?
01:06 tailgate i.e sub foo(--> Int) or sub foo() returns Int
01:07 tailgate or my Int sub foo()
01:07 ugexe technically there should not be. however it seems they can behave differently (or maybe that was recently fixed?)
01:09 dataangel joined #perl6
01:14 cpage_ joined #perl6
01:19 kalkin- joined #perl6
01:22 itaipu joined #perl6
01:25 Actualeyes joined #perl6
01:30 itaipu joined #perl6
01:32 poohman_ joined #perl6
01:32 awwaiid bleh. Not being able to paste multiple lines into the REPL is annoying. Need to fix that.
01:34 pmichaud m: my $input = '(\d\d\d)';  my $m = 'a 123' ~~ /<input=$input>/; say $m
01:34 camelia rakudo-moar 2c95f7: OUTPUT«「123」␤ input => 「123」␤  0 => 「123」␤»
01:34 pmichaud m: my $input = '(\d\d\d)';  my $m = 'a 123' ~~ /$0=<$input>/; say $m
01:34 camelia rakudo-moar 2c95f7: OUTPUT«「123」␤ 0 => 「123」␤  0 => 「123」␤»
01:39 mcmillhj joined #perl6
01:40 labster joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:56 mcmillhj joined #perl6
01:57 cognominal joined #perl6
02:06 MilkmanDan joined #perl6
02:09 mcmillhj joined #perl6
02:16 MilkmanDan joined #perl6
02:23 noganex joined #perl6
02:29 mcmillhj joined #perl6
02:30 rgrinberg joined #perl6
02:31 shantanu joined #perl6
02:31 labster joined #perl6
02:32 shantanu Hello #perl6!
02:39 itaipu joined #perl6
02:46 mcmillhj joined #perl6
03:01 mcmillhj joined #perl6
03:05 AlexDaniel o/
03:12 Woodi hi :)
03:14 raydiak \o
03:16 Pierre_ joined #perl6
03:20 mcmillhj joined #perl6
03:35 mcmillhj joined #perl6
03:39 canopus joined #perl6
03:46 mcmillhj joined #perl6
03:50 Pierre_ joined #perl6
04:02 goxiao joined #perl6
04:11 wamba joined #perl6
04:15 Pierre_ joined #perl6
04:16 mcmillhj joined #perl6
04:19 Pierre_ joined #perl6
04:22 sammers hi perl6
04:22 poohman joined #perl6
04:31 skids o/
04:32 mcmillhj joined #perl6
04:34 Actualeyes joined #perl6
04:34 sammers m: my $m1 = Map.new("id", 1234); my $m2 = Map.new("score", 54321); say ($m1.Hash, $m2.Hash).Map
04:34 camelia rakudo-moar 2c95f7: OUTPUT«Map.new((:id(1234),:score(54321)))␤»
04:35 sammers hmm, is there any other way to merge Maps together?
04:37 sammers Hash is a bit simpler
04:37 sammers m: my %h1 = id => 1234; my %h2 = score => 54321; say %(%h1, %h2);
04:37 camelia rakudo-moar 2c95f7: OUTPUT«{id => 1234, score => 54321}␤»
04:42 mcmillhj joined #perl6
04:49 Pierre_ joined #perl6
04:59 Pierre_ joined #perl6
05:00 Cabanossi joined #perl6
05:04 mohae_ joined #perl6
05:08 Pierre_ joined #perl6
05:10 El_Che DrForr: cheers! (O'Reilly)
05:14 mcmillhj joined #perl6
05:24 domidumont joined #perl6
05:26 Pierre_ joined #perl6
05:32 ufobat joined #perl6
05:33 wamba joined #perl6
05:36 Sgeo joined #perl6
05:39 zengargoyle joined #perl6
05:39 sammers m: my $m1 = Map.new("id", 1234); my $m2 = Map.new("score", 54321); say Map.new($m1.pairs, $m2.pairs);
05:39 camelia rakudo-moar 2c95f7: OUTPUT«Map.new((:id(1234),:score(54321)))␤»
05:41 mcmillhj joined #perl6
05:44 Pierre_ joined #perl6
05:54 domidumont joined #perl6
06:02 Pierre_ joined #perl6
06:07 albongo joined #perl6
06:09 andrzejku joined #perl6
06:14 mcmillhj joined #perl6
06:17 konobi is there documentation of all the set operators available?
06:19 Pierre_ joined #perl6
06:20 sammers konobi: have you seen this? https://docs.perl6.org/language/setbagmix
06:20 konobi thanks!
06:20 sammers np
06:21 konobi is larry around at all?
06:24 sammers haven't seen him today.
06:28 firstdayonthejob joined #perl6
06:30 CIAvash joined #perl6
06:33 konobi any other linguists around?
06:38 Pierre_ joined #perl6
06:43 mcmillhj joined #perl6
06:48 labster joined #perl6
06:49 darutoko joined #perl6
06:52 fdsfds joined #perl6
06:53 fdsfds left #perl6
06:53 nadim joined #perl6
06:58 djbkd joined #perl6
07:00 fdsfds joined #perl6
07:01 mcmillhj joined #perl6
07:02 fdsfds is there any information about perl6 performance, benchamarks, has it been improved lately?
07:04 moritz fdsfds: there have been blog posts about that on http://perl6.party/
07:06 fdsfds yeah, but the article about performance was posted in april, it's a long ago
07:06 konobi moarvm has been making good incremental improvements
07:09 fdsfds are there any benchmarks?
07:09 amalia_ joined #perl6
07:10 El_Che fdsfds: tux posts results about his module very regularly
07:12 fdsfds El_Che: who's tux?
07:13 moritz the maintainer of perl 5's Text::CSV_XS, iirc
07:13 El_Che idd
07:14 rindolf joined #perl6
07:14 El_Che I don't know if he moved the results to -dev or -toolchain
07:20 mcmillhj joined #perl6
07:22 zakharyas joined #perl6
07:24 konobi also, is there any company using perl6 heavily (so time investment) ?
07:24 Pierre_ joined #perl6
07:26 wamba joined #perl6
07:34 zengargoyle fdsfds: https://p6weekly.wordpress.com/ - usually has a list of recent speed improvements.  there's amost always a few things that got faster since last week...
07:35 simonsharry joined #perl6
07:37 fritz_ lizmat_, moritz: I just sent the eMail with the Perl6-course request to moritz (as I don't have lizmat's eMail address).
07:38 simonsharry Hello all! Where can I find examples of Phasers? Secondly, as I begin using Perl6, I'll have a need to see demo examples of each language feature. I do see http://examples.perl6.org/ but not sure if this is a comprehensive set of examples. Many thanks in advance.
07:38 moritz simonsharry: more working code can be found through https://modules.perl6.org/
07:38 fritz_ moritz: please forward the mail to any of the other German speaking experts in case you can't do the course.
07:39 moritz fritz_: will do
07:40 fritz_ I don't know how big the market is at this point, but it might be worthwhile to have a section about potential speakers/trainers for commercial Perl6 courses (if there isn't one yet).
07:40 mcmillhj joined #perl6
07:41 poohman joined #perl6
07:41 pmurias joined #perl6
07:41 moritz simonsharry: and as for phasers, one thing you can do to find examples is to clone https://github.com/moritz/perl6-all-modules which contains all public perl 6 modules, and then use 'git grep' to search for some
07:41 moritz simonsharry: for example  git grep --word LEAVE
07:42 simonsharry Will do, thanks moritz.
07:42 Pierre_ joined #perl6
07:45 Pierre_ joined #perl6
07:54 mcmillhj joined #perl6
07:58 lizmat fritz_: No problem, if moritz is picking this up, he can do a better job than I can :-)
08:02 mohae joined #perl6
08:02 jonas2 joined #perl6
08:02 Zoffix__ joined #perl6
08:03 fritz_ lizmat: I am sure they would profit from you as well ... and I guess there should be plenty of people that would benefit from Perl6 classes ... :-)
08:04 lizmat well, if no native-german speaker can give the course, I can  :-)
08:05 mcmillhj joined #perl6
08:06 fritz_ lizmat: good to know that there are several people that can teach in German. At least for Germany that seems to be an issue (here in Switzerland English would usually work well).
08:15 nadim joined #perl6
08:18 rindolf joined #perl6
08:19 RabidGravy joined #perl6
08:23 DrForr El_Che: Thanks! The wording is now what I'd chosen, people at ORA got some wires crossed and I wasn't able to review things before the landing page was created.
08:29 Zoffix left #perl6
08:30 El_Che DrForr: yeah, I saw that. On the otherhand, some troll will have a full belly by now :)
08:32 DrForr Not *really* blaming ORA, but I really would have liked a chance to review things before they put up the landing page.
08:34 DrForr And of course the only comment on /r/perl6 is 'F*ck em' (censoring: mine.) Tempted to reply with "Thus proving *why* I made the change." but that might have been too mean.
08:43 Actualeyes left #perl6
08:50 El_Che DrForr: silly, if you ask me. But out of your hands. It doesn't change that it's great news
08:50 El_Che \o/
08:51 andrzejku joined #perl6
08:52 Woodi m: class C { has $.g; method m( Int $i ) { $.g = $i } }; my $c = C.new( :g(0) ); $c.m(2);
08:52 camelia rakudo-moar 2c95f7: OUTPUT«Cannot modify an immutable Int␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:53 Woodi how to use $.-type attrs ??
08:53 mcmillhj joined #perl6
08:56 rightfold left #perl6
09:22 sammers m: class C { has $.g is rw; method m( Int $i ) { $.g = $i } }; my $c = C.new( :g(0) ); say $c.m(2);
09:22 camelia rakudo-moar 2c95f7: OUTPUT«2␤»
09:22 sammers Woodi: ^^^^
09:27 Woodi sammers: I'm pretty sure I try to put  is rw  on attribute... but works, thanx :)
09:27 sammers np
09:28 mcmillhj joined #perl6
09:36 eliasr joined #perl6
09:37 CIAvash joined #perl6
09:38 jkramer left #perl6
09:41 cpage_ joined #perl6
09:57 zakharyas joined #perl6
10:00 dalek doc: a2c9940 | (Armand Halbert)++ | doc/Language/variables.pod6:
10:00 dalek doc: Fixed confusing wording in the state variables docs
10:00 dalek doc: review: https://github.com/perl6/doc/commit/a2c994020e
10:00 dalek doc: 45635a0 | RabidGravy++ | doc/Language/variables.pod6:
10:00 dalek doc: Merge pull request #907 from ahalbert/906
10:00 dalek doc:
10:00 dalek doc: Fixed confusing wording in the state variables docs
10:00 dalek doc: review: https://github.com/perl6/doc/commit/45635a0c3f
10:01 nadim joined #perl6
10:03 mcmillhj joined #perl6
10:06 DrForr Was talking with one of our marketing people here, and it transpired that he had a problem finding articles on Perl for a non-technical market. He pointed me to https://blog.hellojs.org/el-capitan​-and-beyond-could-change-the-way-we​-develop-81d0927c619d?source=latest and https://blog.hellojs.org/spy​ing-on-the-dom-d9c3d2beb2f8#.mazdywc41 as articles that he was hoping to see for Perl/Perl6. Not that I have the time to help right now, but after con
10:15 mcmillhj joined #perl6
10:16 MilkmanDan joined #perl6
10:26 Pierre_ joined #perl6
10:33 Woodi DrForr: what exactly your buddy wants ? becouse links show technical articles :)  just light popular-programming ? who is target audience ?  rechnical ppls interested on subject/news or rather management ?
10:36 DrForr I haven't read the articles in question, and he really couldn't explain why they worked for him. I'm guessing the target audience is lighter weight than what he'd been looking for.
10:54 Pierre_ joined #perl6
10:56 Woodi :w
10:57 yqt joined #perl6
11:01 raydiak I'd guess the target audience is non-techincal coworkers. E.g. marketing people wanting to write glowing fluffy things about the technology underlying their products. Also decision-making executives with more managerial than technical skill, who need convincing (a need I had recently).
11:03 mcmillhj joined #perl6
11:05 DrForr Yep. I was just noticing a potential hole in what we're talking about in blogging and such.
11:07 raydiak Also, generally, I'd think maximizing our positive impression on as many people as possible regardless of their programming proficiency could only be a good thing. People talk about things they're ignorant of all the time, because they think it makes them sound less ignorant. Like me right now :)
11:12 raydiak Oh yes, bloggers are another great example
11:12 Pierre_ joined #perl6
11:14 timotimo oh, it's raydiak! :)
11:14 raydiak hiya timo! how goes it?
11:15 DrForr Once I feel like I can focus less on what I'm working on right now...
11:15 timotimo all right, how about you?
11:16 raydiak I'm great! Got a good job, talked my boss into using perl instead of php, and moved to Austin, TX.
11:17 timotimo \o/
11:17 timotimo perl is a definite big step up from php
11:18 tadzik nice :)
11:18 raydiak No kidding...big step up, and very nice indeed :)
11:19 raydiak hopefully I can be more active here again in the near future, but all my time goes into more direct work things right now. It's almost 6:30 AM here. I'm still up, just winding down now.
11:19 DrForr CPanel?
11:20 raydiak But being up all night loving perl instead of loathing php is something I'm truly thankful for
11:20 raydiak nope not cpanel, our own products. can't talk about it much yet though, non-disclosure agreement
11:22 DrForr Ah.
11:22 bjz joined #perl6
11:23 raydiak Very exiciting though, rest assured I'll be spouting off about it all as soon as they'll let me. Perl 6, not 5.
11:33 araujo joined #perl6
11:35 raydiak Luckily $boss is quite technically literate, used to be a p5 coder himself. So there is a good foundational understanding of what we're getting in to, advantages and obstacles and so forth.
11:36 mcmillhj joined #perl6
11:36 araujo joined #perl6
11:38 raydiak tip for anyone else having those discussions, "it'll get lighter and faster over time without us changing one line of our own code" was one of the key selling points
11:38 araujo joined #perl6
11:39 rindolf joined #perl6
11:39 skids joined #perl6
11:41 araujo joined #perl6
11:41 timotimo oh, really?
11:41 timotimo isn't that just "it's currently performing very bad, but bad performance will be improved in the future"?
11:44 lizmat timotimo: please remember that requirements in an agile environment can change quickly
11:45 raydiak depends on which side of the coin you face towards the audience :) but yeah it's only one of the points. so far we seem to be finding approaches which perform adequately for immediate needs, so if y'all keep up the awesome performance work, we'll end up with something quite speedy in the long run
11:45 lizmat oops, read raydiak;'s comment wrong  :-)
11:45 kent\n joined #perl6
11:45 lizmat raydiak: yes, the goal is to be faster than perl 5 :-)
11:46 lizmat https://www.youtube.com/watch?v=wxU8OXKGNKc   # stmuk's talk at YAPC::EU
11:46 mcmillhj joined #perl6
11:46 raydiak nice, I like that goal, that would be more than adequate
11:46 timotimo you may end up writing "performance optimized" code today because you can't get it to perform well enough, and two days later a core builtin gets optimized by lizmat and suddenly the "idiomatic" code would be 10x faster than your optimized code :P
11:47 timotimo basically: hire a perl6 core dev :P
11:47 lizmat timotimo: disagree  :)
11:47 lizmat that kind of optimization effects I expect from merging brrt's work on the JIT
11:48 raydiak we aren't really optimizing with fiddly chunks of longhand code, more building assumptions of slowness into the design and structure itself
11:49 timotimo a noticable amount of slowness still comes from doing stuff we don't even need to do
11:49 timotimo not sure how much of that the jit will be able to kick out, but there's still many avenues of optimization that spesh'll learn one day
11:51 lizmat timotimo: any suggestions of areas to look into aa far as you know ?
11:52 ptolemarch joined #perl6
11:53 timotimo difficult to say. i read everywhere that you have to measure before you optimize ;)
11:53 timotimo so we'd have to find a few benchmarks first that show some flaw
11:54 timotimo like, one cool thing we can have is "allocation sinking" where we pretend an object has been allocated even though we still only have the values that would go into the fields around in registers
11:54 timotimo and we only actually allocate the object if something really, really, really wants to have the object
11:55 kaare__ joined #perl6
11:55 raydiak timotimo: another little selling point was "I have a good relationship with this guy who knows quite a bit about rakudo internals and performance" ;)
11:55 nine timotimo: in other words: being lazy
11:55 timotimo nine: yes, almost criminally lazy ;)
11:56 timotimo when we get "escape analysis", a big amount of things that used to be allocated in the global heap will be able to live on the stack and immediately be "reclaimed" when a routine or code block or whatever is left
11:56 nine Which is where a large part of the 2 order of magnitue module loading speedup comes from
11:56 arnsholt There's a neat mailing list post about why GNU grep is fast which basically has that as the moral: "read as few bytes as possible"
11:57 timotimo the assumption is that a gigantic amount of Scalar allocation (except when you're using Arrays) will be cheapened this way
11:57 arnsholt Yeah, stack allocation is way better than heap allocation
11:57 timotimo aye
11:57 timotimo still it's hard to know when you can get away with it
11:57 timotimo that's the reason we don't have escape analysis yet ;-
11:57 arnsholt Definitely, definitely
11:57 timotimo every single moarvm op has to be annotated as to *how* it treats values passed to it
11:58 arnsholt And why it's a task that more or less only jnthn++ can do =)
11:58 timotimo jnthn and masak started on it a year or two ago, but didn't pull through yet
11:58 arnsholt Oh, neato!
11:58 arnsholt I'm way, way out of the loop on a lot of this stuff these days =(
11:59 Pierre_ joined #perl6
11:59 timotimo these days it's mostly "lizmat glances at a core builtin, and suddenly it's 10x faster"
11:59 mcmillhj joined #perl6
11:59 lizmat at the expense of beauty :-(
11:59 timotimo jnthn has done a very good job of making everything stable when multi-threading is involved
12:00 itaipu joined #perl6
12:00 timotimo lizmat: the internals are allowed to be less beautiful; only surgeons get to see it when they cut open the outside ;)
12:01 nine timotimo: less beautiful also means less maintainable and harder to get into. We lose a large selling point that way as suddenly perl 5's C code doesn't compare all that bad anymore.
12:01 timotimo ah, hmm
12:01 timotimo our internals now basically resemble lisp :P
12:01 lizmat this is how we look at it now; I distinctly remember a view posted here that the Perl 6 internals should be exemplary Perl 6 code
12:01 arnsholt It's a tradeoff, definitely
12:01 timotimo i remember that, too :(
12:02 arnsholt But as speed and elegance in code are frequently opposed, we have to choose
12:02 arnsholt As an example of favouring elegance and simplicity, consider CPython
12:03 nine I would consider CPython neither simple, nor elegant
12:03 arnsholt They explicitly want their code to be simple and easy to get into, meaning that many things that make things go faster are off the table
12:03 timotimo hm, right
12:03 arnsholt Yeah, I'm not familiar with the codebase, but apparently it's a problem with making CPython go faster
12:03 timotimo and then something like pypy has to come along for the performance part :P
12:06 timotimo something i personally would like to see is less code generated for trying to call .sink on stuff
12:07 timotimo but i don't know how big the performance impact of that is for things that don't have a sink method callable on it
12:08 masak I may have expressed the view that setting code should be held to a standard of beauty -- that sounds like something I'd say
12:09 masak however, I also recognize the need to compromise with other factors, chiefly performance
12:10 masak my main worry with that is that, as we get better at actually folding optimizations into the compiler so they no longer have to be done manually, scars of manual optimizations will remain in the setting
12:10 masak maybe that's a silly worry, I don't know
12:10 timotimo if we had macros, we could perhaps make that stuff a bit more concise and readable
12:10 nine Well...
12:10 timotimo that's a truth, masak. i 100% expect that to happen ;(
12:11 timotimo on the other hand, it's probably easy to see which parts of the core setting have been manually optimized like that, just search for lizmat commits with a few words in them, like fast
12:11 nine A crazy way to do it would be to have the optimizer replace our beautiful core code with hand crafted nqp implementations...
12:11 masak macros are on the way. 007 is working as intended there, showing what will be possible.
12:14 arnsholt Yeah, there will definitely be performance-detrimental performance optimizations once the compiler gets better
12:14 masak oh, that too
12:14 mcmillhj joined #perl6
12:15 masak perhaps we would do well to keep unoptimized code around in comments (or in some other way)
12:15 masak so that something automated could spectest and perftest on a regular basis
12:15 masak and flag things up as "hey, this optimization does nothing anymore -- hooray!"
12:15 arnsholt I remember reading about someone who removed all instances of Duff's device from X.org (I think) and suddenly the binary was both faster and smaller
12:15 timotimo hah, ouch
12:15 timotimo masak: well, we already have #?if stuff
12:16 arnsholt Because 2010s CPUs are different from 1980s CPUs
12:16 lizmat afk&
12:16 masak timotimo: that may or may not be better than what I proposed
12:16 timotimo we can keep the code honest by generating both variants of CORE.setting on travis
12:16 masak aye
12:16 timotimo and then spec test
12:16 itaipu joined #perl6
12:18 nine lizmat++'s optimized versions frequently also fix bugs
12:20 timotimo oh, that's not good for turning diffs by lizmat into "unoptimized, clean in the ‘then’, optimized, complicated in the ‘else’" thing
12:20 timotimo we'll end up with bugged clean code in the ‘then’ that we'll also have to fix
12:21 timotimo but maybe now is a good time to start doing that kind of thing?
12:21 raydiak alright #perl6, I'm very happy to be chatting with you all again! but it's after 7 AM, my reality is melting from sleep deprivation, can't even keep up with conversation any more :) good morning/night all o/
12:21 timotimo \o/
12:21 timotimo gnite raydiak
12:25 mcmillhj joined #perl6
12:28 nine Well considering our plentiful resources for core development, I'd suggest taking on one problem at a time and focus on low level performance barriers. Somewhere down the road we may be able to start porting our NQP internals back to Perl 6 (including all the improvements added since porting to NQP).
12:29 masak +1
12:29 timotimo OK
12:29 Venkatesh joined #perl6
12:29 Venkatesh Hi
12:29 nine Btw. I just don't buy into the whole "only jnthn can do this" line. Yes, he is an exceptional developer. But often it's just a matter of accepting that it will take time to dig into something and just stick with it.
12:30 nine Which is something jnthn++ has done often enough to not need as much digging anymore :)
12:33 grondilu yeah but still in the end, whether it's becaus of previous commitment or just talent, the assertion "only X can do this" remains true.
12:33 * jnthn does try to write clear code that others *can* get in to
12:33 jmark joined #perl6
12:35 jnthn I think some of the time, people assume compiler/VM stuff "must be terribly scary".
12:35 nine grondilu: no it doesn't. If it was "only jnthn can do it in a week", that's something else and certainly true in many cases. Others will take longer as they need to do a lot of digging first. But they can do that.
12:35 grondilu well if you take the sentence *litterally*, sure.
12:35 jnthn And it sometimes is, but it's the exception, not the norm.
12:36 grondilu I'm sure even I could do what jnthn did, if you give a me a hundred years or something :)
12:36 jnthn I think Zoffix++'s write-up of how he fixed the quotes in qw constructs recently was a good example of how taking the time and being methodical lets you dig in and solve problems.
12:36 mcmillhj joined #perl6
12:37 arnsholt Yeah, I agree. Internals are frequently less scasry than one might expect
12:37 arnsholt I still suspect that escape analysis is kinda complicated, though =)
12:38 jnthn I dunno, given that a bunch of people here are rather stronger at their mathematics than me...
12:39 nine Well if most of it really is just "every single moarvm op has to be annotated as to *how* it treats values passed to it", then it sounds like just reading a lot of code to me.
12:39 jnthn (EA algorithms involve lattices. I don't grok those yet. :))
12:40 jnthn Well, they often involve, anyway :)
12:43 arnsholt Oh, lattices are fairly straightforward as far as their theoretical construction goes
12:44 arnsholt Of course, that doesn't always help with grokking uses of them =)
12:44 arnsholt But it's basically just a DAG with some special properties
12:45 Praise joined #perl6
12:45 Praise joined #perl6
12:45 poohman_ joined #perl6
12:46 arnsholt Basically, for any pair of nodes there's a node that's reachable from both nodes (a join) and a node from which you can reach both nodes (a meet)
12:47 * timotimo hasn't yet heard of this yet
12:47 arnsholt The Wikipedia page discusses it in terms of partially ordered sets, but for a computer scientists a DAG is more familiar
12:48 jnthn Hm, the DAG explanation makes more sense to me given I'm used to those :)
12:48 arnsholt Yeah, if you're in CS it's more intuitive
12:49 jnthn Hm, so the think looks like a diamond :)
12:49 jnthn *thing
12:49 arnsholt Yeah
12:50 arnsholt The meet and join conditions imply that there's a singular meet from which you can reach everything (the infimum), and a join which is reachable from everything (the supremum)
12:50 arnsholt The DAG to poset mapping is that the nodes of the graph are the elements of the set being ordered, and an edge from A to B means that A < B
12:52 jnthn Aha
12:53 bioduds joined #perl6
12:53 jnthn This makes some sense; thanks!
12:54 jkramer joined #perl6
12:54 jkramer Ahoy!
12:54 jkramer Is there a more efficient way to look for bytes or byte sequences in a Buf/Blob than looping over its bytes?
12:55 moritz you could decode as latin-1 and then use the index function
12:55 jkramer Buf doesn't seem to have a whole lot of methods to mess with its contents
12:55 moritz not sure how that compares in efficiency
12:56 jkramer Hmm, I'd like to avoid decoding because the buffer can theoretically contain big amounts of binary data and the byte sequence I'm looking for is typically somewhere in the front
12:58 rudolfochrist joined #perl6
13:03 mcmillhj joined #perl6
13:06 zakharyas joined #perl6
13:10 nine jkramer: do what moritz++ suggested with subbufs?
13:10 araujo_ joined #perl6
13:10 cdg joined #perl6
13:13 rgrinberg joined #perl6
13:13 araujo_ joined #perl6
13:16 araujo_ joined #perl6
13:16 bjz joined #perl6
13:18 bjz joined #perl6
13:18 araujo_ joined #perl6
13:20 araujo_ joined #perl6
13:21 dryx joined #perl6
13:23 araujo_ joined #perl6
13:23 AlexDaniel joined #perl6
13:24 dalek joined #perl6
13:25 araujo_ joined #perl6
13:27 skids joined #perl6
13:28 araujo_ joined #perl6
13:30 araujo_ joined #perl6
13:31 bjz joined #perl6
13:34 jkramer nine: That probably saves some memory but I guess it'd be even slower decoding chunks and then searching them
13:34 nine jkramer: never try to guess how performance will be :)
13:35 araujo_ joined #perl6
13:37 MilkmanDan joined #perl6
13:37 bioduds how does simple math works in perl6?
13:38 araujo_ joined #perl6
13:38 bioduds like Math.Random for instance?
13:38 moritz m: say 1 + 4 # simple math
13:38 camelia rakudo-moar 2c95f7: OUTPUT«5␤»
13:39 bioduds like other languages have Math class for instance
13:39 bioduds is there a rand function?
13:40 moritz m: say rand
13:40 camelia rakudo-moar 2c95f7: OUTPUT«0.945241411041802␤»
13:40 moritz bioduds: that was too hard for you to try out on your own, right? :-)
13:40 bioduds yep, sorry
13:40 bioduds lazy here
13:40 araujo_ joined #perl6
13:40 lizmat m: say ^10 .pick
13:40 camelia rakudo-moar 2c95f7: OUTPUT«5␤»
13:40 lizmat m: say ^10 .pick
13:40 camelia rakudo-moar 2c95f7: OUTPUT«5␤»
13:40 lizmat m: say ^10 .pick
13:40 camelia rakudo-moar 2c95f7: OUTPUT«8␤»
13:40 lizmat *phew*  :-)
13:40 lizmat m: say ^10 .pick
13:40 camelia rakudo-moar 2c95f7: OUTPUT«5␤»
13:40 bjz_ joined #perl6
13:40 lizmat hmmm
13:40 lizmat m: say ^10 .pick
13:41 camelia rakudo-moar 2c95f7: OUTPUT«6␤»
13:41 * moritz would have been very amused if the third try would have been 5 too :-)
13:41 bioduds pick is nice
13:41 bioduds can I range pick?
13:41 bioduds like 10..1000.pick?
13:42 moritz bioduds: try it!
13:42 lizmat sure
13:42 bioduds cool
13:42 lizmat m: 10..10000 .pick.say
13:42 camelia rakudo-moar 2c95f7: OUTPUT«WARNINGS for <tmp>:␤Useless use of ".." in expression "10..10000 .pick." in sink context (line 1)␤10000␤»
13:42 lizmat huh?
13:42 moritz m: say 10..10000 .pick
13:42 camelia rakudo-moar 2c95f7: OUTPUT«10..10000␤»
13:42 lizmat m: (10..10000).pick.say
13:42 camelia rakudo-moar 2c95f7: OUTPUT«53␤»
13:42 moritz parsing weirdness?
13:43 araujo_ joined #perl6
13:43 lizmat yeah probably
13:43 lizmat commute to NR.pm meeting&
13:44 jnthn Probably confusing it with ^10000 .pick; here prefix:<^> binds tigether than infix:<.>
13:44 jnthn whereas infix:<.> is tighter than infix:<..>
13:44 AlexDani` joined #perl6
13:45 jkramer m: 10..100 .WHAT
13:45 camelia rakudo-moar 2c95f7: OUTPUT«WARNINGS for <tmp>:␤Useless use of ".." in expression "10..100 ." in sink context (line 1)␤===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
13:45 aries_liuxueyang joined #perl6
13:45 jkramer What does the stuff after SORRY! mean?
13:45 jkramer (It's a pretty long stack trace when I do it locally)
13:46 moritz it's confused :-)
13:46 moritz basically WHAT is not a normal method, but something special
13:46 bioduds you have to enclose in ()
13:46 moritz and that special form doesn't seem to work with the . operator, just when call it without a space
13:46 bioduds like (10..100).pick
13:47 bioduds works here
13:48 jkramer Yeah, I know, just wanted to see what .WHAT would say about x..y vs (x..y)
13:48 moritz m: say WHAT 10..100
13:48 camelia rakudo-moar 2c95f7: OUTPUT«(Range)␤»
13:48 jkramer Ah nice :D
13:51 woolfy left #perl6
13:51 bioduds $.galaxies = ($.smallest-number-of-galaxies..$.​greatest-number-of-galaxies).pick;
14:10 ugexe technically wouldn't you use `roll` for such a random value
14:12 ugexe you wouldnt do `($galaxies1, $galaxies2) = (1..10).pick(2)` for instance
14:17 cooper_ joined #perl6
14:19 moritz depends on whether you want them to be always distinct or not
14:23 mcmillhj joined #perl6
14:25 * ugexe awaits the day work code review involves zero argument pick vs roll
14:26 Actualeyes joined #perl6
14:27 khw joined #perl6
14:27 moritz we don't do enough randomness to discuss that often here :-)
14:28 mst the only thing that's random in here is the puns :D
14:39 mcmillhj joined #perl6
14:45 ugexe m: say ().pick(1); say ().pick
14:45 camelia rakudo-moar 2c95f7: OUTPUT«()␤Nil␤»
14:48 Xliff <moritz> you could decode as latin-1 and then use the index function
14:48 Xliff Buf could probably use an .index method for byte sequences where decoding is not necessary.
15:02 Xliff m: my ($g1, $g2); ($g1, $g2) = ^20.pick(2); say $g1; say $g2
15:02 camelia rakudo-moar 2c95f7: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at <tmp>:1␤    ------> 3my ($g1, $g2); ($g1, $g2) = ^207⏏5.pick(2); say $g1; say $g2␤0␤(Any)␤»
15:02 Xliff m: my ($g1, $g2); ($g1, $g2) = (^20).pick(2); say $g1; say $g2
15:02 camelia rakudo-moar 2c95f7: OUTPUT«1␤7␤»
15:02 Xliff m: my ($g1, $g2); ($g1, $g2) = (^20).pick(2); say $g1; say $g2
15:02 camelia rakudo-moar 2c95f7: OUTPUT«1␤7␤»
15:02 Xliff Interesting
15:03 Xliff m: my ($g1, $g2); ($g1, $g2) = (^20).roll(2); say $g1; say $g2
15:03 camelia rakudo-moar 2c95f7: OUTPUT«2␤11␤»
15:03 Xliff m: my ($g1, $g2); ($g1, $g2) = (^20).roll(2); say $g1; say $g2
15:03 camelia rakudo-moar 2c95f7: OUTPUT«3␤14␤»
15:07 mcmillhj joined #perl6
15:14 dalek doc: d658a1b | (Armand Halbert)++ | doc/Language/functions.pod6:
15:14 dalek doc: Added documetation on function return types.
15:14 dalek doc: review: https://github.com/perl6/doc/commit/d658a1b44a
15:14 dalek doc: 5f8fb85 | RabidGravy++ | doc/Language/functions.pod6:
15:14 dalek doc: Merge pull request #908 from ahalbert/903
15:14 dalek doc:
15:14 dalek doc: Added documetation on function return types.
15:14 dalek doc: review: https://github.com/perl6/doc/commit/5f8fb855ae
15:18 skids ^^ might want to mention that Nil and Failure are exempt.
15:21 dryx left #perl6
15:31 girafe joined #perl6
15:37 mcmillhj joined #perl6
15:37 lizmat joined #perl6
15:40 Actualeyes joined #perl6
15:44 canopus joined #perl6
16:07 dalek doc: 417fbfe | (Zoffix Znet)++ | doc/Language/functions.pod6:
16:07 dalek doc: Indicate Nil/Failure are exempt from return constraints
16:07 dalek doc: review: https://github.com/perl6/doc/commit/417fbfe0f0
16:11 mcmillhj joined #perl6
16:15 Sgeo joined #perl6
16:17 wamba joined #perl6
16:18 geraud joined #perl6
16:24 mcmillhj joined #perl6
16:25 acrussell joined #perl6
16:38 mcmillhj joined #perl6
16:52 mcmillhj joined #perl6
16:56 canopus joined #perl6
16:59 aries_liuxueyang joined #perl6
17:05 mcmillhj joined #perl6
17:07 ilmari[m] joined #perl6
17:10 _slade_ joined #perl6
17:15 firstdayonthejob joined #perl6
17:16 mcmillhj joined #perl6
17:19 firstdayonthejob joined #perl6
17:26 wamba joined #perl6
17:27 zakharyas joined #perl6
17:40 yqt joined #perl6
17:48 isBEKaml joined #perl6
17:49 isBEKaml OHHAI, why does the RSS feed entry for p6weekly produce some mojibake for a summary?
17:50 isBEKaml This is what I see: PHA+VGhpcyB3ZWVrIHNhd....
17:51 isBEKaml and here's the URL to that entry: https://p6weekly.wordpress.com/20​16/09/12/warmen-up-das-youtuben/
17:51 andrzejku joined #perl6
17:53 DrForr That looks like base64 encoding, maybe a YouTube URL is getting misinterpreted somewhere?
17:53 spider-mario joined #perl6
17:53 isBEKaml DrForr: that's what I thought, but I don't see any video embedding on the page!
17:56 isBEKaml Oh, youtube URLs getting mangled into base64. Nice!
17:58 DrForr Heh, I'm just having fun watching people on reddit playing ping-pong with my ORA training submission.
17:59 isBEKaml ORA -- Oracle?
17:59 DrForr Yep.
18:01 isBEKaml DrForr: http://www.oreilly.com/live-traini​ng/top-10-things-about-perl-6.html (:-(
18:01 isBEKaml I'll be on vacation then, with no access to a compute
18:01 isBEKaml *r
18:01 DrForr Vacation good.
18:02 FROGGS joined #perl6
18:03 DrForr At least I assume what's between the up/down arrows is the karma (or whatever they call votes) the article gets - It bounces between 1 and 6 every time I refresh the page.
18:03 DrForr (knowing very little about reddit as I do.)
18:04 isBEKaml DrForr: Don't worry about karma.
18:04 cdg joined #perl6
18:04 DrForr Oh, I'm not worried, I'm just bemused.
18:04 isBEKaml It'll still come back to you when you need it (as to whether that's good or bad, it's a different question)
18:04 DrForr I already have plenty from other sources :)
18:05 stmuk_ DrForr: I suspect its some issue with distributing content votes between servers
18:05 stmuk_ or the caching or something
18:06 andrzejku joined #perl6
18:06 DrForr Yeah, round-robin caching and whatnot. As I said I don't know how the internals work, though it'd make sense that I'm rotating around servers. I'll just let it anneal over a weekend and check later.
18:07 DrForr OTOH I think I can get a v0.2 of Perl6::Tidy out the door over the weekend, assuming I can figure out a decent unification scheme for the disastrous mess that is WS handling at the moment.
18:08 stmuk_ I've also noted the nay sayers seem to get in early to downvote and then voting gradually goes up as people actually read the content or link
18:09 mspo mm format conventions
18:09 stmuk_ I suspect some language wars people just downvote anything not in their language of choice
18:10 mspo reddit does fake up/down numbers on early articles to mess with bots
18:10 mspo it's normal
18:10 DrForr Shrug. Only one person has deigned to comment, and that was with the oh-so-helpful "F*ck em."
18:11 DrForr Ah, cool. Again, there's not a helluva lot to do. I just wanted to make sure the usual suspects got the notice so i can get more stuff outside the anechoic chamber, how the message is *received* I can't help.
18:12 DrForr And again I know nothing of the "community" other than they're another channel where I can get the news out.
18:12 stmuk_ its not just perl 5 or 6 which gets reddit abuse I've seen it posting about other langs
18:12 DrForr (I shouldn't use scare-quotes there, as I gather it's more of a community than others I could mention, such as perlmonks.
18:13 DrForr I don't doubt that it's just people downvoting for the helluvit, I'm just having fun watching.
18:13 sftp joined #perl6
18:14 mspo DrForr: https://www.reddit.com/r/programmingcirclejerk/
18:15 DrForr Not taking any of this personally or seriously.
18:15 mst it seems to be doing fine on r/perl and r/perl6
18:15 mst r/programming is ... variable
18:17 DrForr Oh, it got shared over to /r/perl, cool.
18:18 stmuk_ mspo++
18:19 prammer joined #perl6
18:19 mst I wonder if r/perl should mention r/perl6 exists instead of claiming it's 'the' subreddit for both
18:21 mspo stmuk_: it's so funny (sometimes)
18:21 mspo the rust-shilling guy has slowed down, though
18:21 mspo "did you know that if you used Rust.. fearless concurrency.."
18:22 DrForr OSCON Austin gave everybody free Rust guides.
18:24 tailgate It could be worse, PHP is the butt-monkey of languages.
18:27 mst PHP is a malignant perl5 templating engine that metastasised.
18:30 mspo claim credit
18:30 mspo php is a decent little economy
18:30 TimToady .oO(half of PHP programmers are in the deplorable basket)
18:31 mspo you can build a career around wordpress
18:31 mspo it's impressive
18:31 mst mspo: I am *hugely* impressed by the PHP *community*
18:31 * DrForr tacfully refrains from a "Silence of the Lambs" reference.
18:31 mspo you can build a career as a wordpress plugin developer, even
18:32 mspo I'm starting to come around to the fact that tech elegance/taste is totally unimportant
18:33 mspo but that same argument is made against perl all of the time :)
18:33 tadzik joined #perl6
18:33 M-Illandan joined #perl6
18:33 mspo so I guess it's all about your POV
18:33 Matthew[m] joined #perl6
18:40 DrForr mspo: I'm maintaining a WP blog at work, I can completely understand why.
18:41 LeCamarade joined #perl6
18:48 mohae_ joined #perl6
18:50 nadim joined #perl6
18:54 mcmillhj joined #perl6
18:54 jsimonet Hello, I'm trying to use 'file'.IO.rw to check if it is readable and writable, but I'm getting an error like "Type check failed for return value; expected Bool but got Int (1)". Is it normal?
18:55 prammer joined #perl6
18:55 itaipu joined #perl6
18:56 jsimonet I tested it with "Rakudo version 2016.08.1-196-g2c95f74 built on MoarVM version 2016.08-47-g2eedba8"
19:01 moritz jsimonet: this is indeed a bug in rakudo
19:01 moritz jsimonet: will fix within the next 20min
19:03 jsimonet From what I know, it is located somewhere in src/core/Rakudo/Internals:1212 ?
19:04 moritz jsimonet: src/core/IO/Path.pm
19:04 moritz Rakudo::Internals returning an Int is fine; all the other methods in IO::Path have a ? in them that coerces to Bool, but rw is missing that
19:05 moritz so if my setting compiles fine, I'm confident that adding that prefix will fix it
19:06 labster joined #perl6
19:06 moritz fix pushed.
19:08 mspo DrForr: yeah it sucks
19:08 bioduds hey all, im checking this to understand the constructors but not getting it. https://docs.perl6.org/lang​uage/classtut#Constructors
19:08 bioduds someone has more links to perl6 constructors examples?
19:08 bioduds pretty please
19:09 DrForr Plenty on rosettacode :)
19:09 mspo popular + sucks = $$$
19:09 perlpilot bioduds: what don't you get ?
19:09 bioduds actually, I don't understand the callback and the array
19:09 bioduds are they necessary? what do they do exactly?
19:10 timotimo they are just part of the example
19:10 timotimo they are the attributes of the class that gets consrtucted
19:10 moritz there's also https://docs.perl6.org/languag​e/objects#Object_Construction
19:11 perlpilot I guess that bit of doc could be more explicit that those things are just part of the example
19:11 bioduds oh, now I got it
19:11 bioduds thanks moritz
19:11 DrForr You don't need to write them if you're happy with the default, but you do need to use them (or something that blesses a reference) to get an object back.
19:11 nine http://niner.name/talks/Perl%205%20and%20Per​l%206%20-%20a%20great%20team/examples/Dancr/
19:11 moritz bioduds: when you're looking for examples, cloning https://github.com/moritz/perl6-all-modules and doing a "git grep" for some keywords (like "method new", "method BUILD", "BUILDALL") typically turns up plenty of code
19:13 bioduds okey :)
19:13 bioduds tx
19:17 mcmillhj joined #perl6
19:19 yqt joined #perl6
19:26 AlexDaniel joined #perl6
19:38 bartolin m: use Test; ok (1 ~~ **,1,**), 'smartmatch with Array RHS co-erces LHS to list';  ## from S03-smartmatch/array-array.t
19:38 camelia rakudo-moar 466770: OUTPUT«ok 1 - smartmatch with Array RHS co-erces LHS to list␤»
19:38 bartolin I don't understand that test. could it be that it's bogus because ~~ has a tighter precedence than the comma?
19:39 bartolin m: say so 1 ~~ **,1,**
19:39 camelia rakudo-moar 466770: OUTPUT«True1**␤»
19:41 jnthn m: dd (1 ~~ **,1,**)
19:41 camelia rakudo-moar 466770: OUTPUT«(sub (*@_) { #`(Sub|54615136) ... }, 1, **)␤»
19:41 jnthn Looks like.
19:41 jnthn It's passing a List to OK, and since the List is non-empty it'll pass
19:41 jnthn So yeah, looks bogus
19:41 bartolin https://github.com/perl6/roast/blob/ma​ster/S03-smartmatch/array-array.t#L67
19:42 bartolin there are two of those tests ...
19:42 perlpilot m: use Test;  ok (1,2,5), "looks good to me!";  #  ;-)
19:42 camelia rakudo-moar 466770: OUTPUT«ok 1 - looks good to me!␤»
19:42 bartolin *g*
19:42 jnthn Seems legit :P
19:42 jnthn m: say 1 ~~ (**,1,**)
19:42 camelia rakudo-moar 466770: OUTPUT«False␤»
19:43 jnthn m: say 1 ~~ (1,**)
19:43 camelia rakudo-moar 466770: OUTPUT«False␤»
19:43 jnthn m: say (1,2) ~~ (1,**)
19:43 camelia rakudo-moar 466770: OUTPUT«True␤»
19:43 jnthn m: say (1,) ~~ (**,1,**)
19:43 camelia rakudo-moar 466770: OUTPUT«True␤»
19:44 jnthn So, seems it doesn't coerce it to the list, contrary to what the test claims.
19:44 bartolin aha, the LHS is not coerced to a list with 1 ~~ (**,1,**)
19:44 * bartolin is to slow
19:44 jnthn Well, the test's *comment* claims, at least. :P
19:44 jnthn It's also misleading 'cus it says "Array RHS" but the RHS there is actually a List...
19:45 konobi any linguists about at all?
19:46 spebern joined #perl6
19:46 perlpilot konobi: one might say we're all linguists since we study these strange, foreign languages called "programming languages"
19:47 cog_ joined #perl6
19:48 bartolin so, those bogus tests could be removed from roast? and, perhaps more important, should '1 ~~ (**,1,**)' actually return True?
19:52 Ven_ joined #perl6
19:52 skids bartolin: there are a few hoops to jump through WRT removing roast tests, since the tests are the language definition/contract.
19:52 skids (adding tests is less cumbersome)
19:53 skids I don't know if anyone wrote that up as an administrative procedure yet.
19:54 andre joined #perl6
19:55 jnthn Yes, but it's the executional behavior of the tests that's the contract, not the hopeful comments. And all these were actually testing is, "does a non-empty list evaluate to True". So long as that is covered somewhere else (surely it is) then we can modify these tests to whatever the answer to "is the LHS coerced" is
19:56 jnthn And I don't know the answer to that, sorry.
19:56 perlpilot bartolin: I don't see why 1 ~~ (**,1,**) should return True.  Maybe if it were (1,) ~~ (1, **, **)  or perhaps 1 ~~ (1,**,**)
19:56 jnthn If the latter is going to work, the former would too... ** means "any number of elements"
19:58 bartolin jnthn: I see, thanks for looking and explaining! (skids++ and perlpilot++, too)
20:01 espadrine joined #perl6
20:06 AlexDaniel TIL perlfoundation.org does not support unicode in comments. Second half of my comment was cut off because of emoji
20:07 arnsholt konobi: You called? =)
20:08 konobi ah, larry got back to me =0)
20:09 b2gills m: say {[R[&(1/*+*)]](@_).nude}(3,7,15,1,292,1) # https://codegolf.stackexchange.com/a/93385/1147
20:09 camelia rakudo-moar 466770: OUTPUT«(104348 33215)␤»
20:10 bartolin I think, I'll leave those tests from S03-smartmatch/array-array.t as they are, but will add a comment, linking to this discussion
20:10 spebern joined #perl6
20:11 konobi arnsholt: turns out that it's more semiotics that I'm after
20:12 arnsholt Ah. I'm decidedly less useful for that, I'm afraid =)
20:14 tailgate Is there a way to see all the members/methods of an object avaliable? Also, can you construct a type hiearchy of an object?
20:15 TEttinger joined #perl6
20:16 konobi tailgate: the mop
20:16 tailgate the mop?
20:16 konobi https://docs.perl6.org/language/mop
20:16 spebern tailgate: say $obj.^methods;
20:18 perlpilot m: "foo".^methods.say;
20:18 camelia rakudo-moar 466770: OUTPUT«(BUILD Int Num chomp pred succ simplematch match ords samecase samemark samespace word-by-word trim-leading trim-trailing trim encode NFC NFD NFKC NFKD wordcase trans indent codes chars uc lc tc fc tclc flip ord WHY WHICH Bool Str Stringy DUMP ACCEPTS chop…»
20:18 tailgate can you do the same thing for members?
20:19 perlpilot m: class C { has $!a;  }; say C.^attributes;
20:19 camelia rakudo-moar 466770: OUTPUT«(Mu $!a)␤»
20:19 spebern tailgate: say $obj.^attributes;
20:19 tailgate thanks
20:20 El_Che DrForr: the first review on your talk on safari has arrived :)
20:20 DrForr Hooboy.
20:22 Ven__ joined #perl6
20:22 labster joined #perl6
20:23 cdg joined #perl6
20:24 cdg joined #perl6
20:34 optikalmouse joined #perl6
20:34 optikalmouse submitted the 1st draft of my article and for the second draft adding another part about saving JSON strings to a file.
20:34 optikalmouse spurt 'cool.json', to-json(my-obj);
20:35 optikalmouse are the brackets around my-obj necessary?
20:35 moritz no
20:36 moritz they'd only be necessary if there's another argument to spurt after the to-json call
20:38 optikalmouse spurt 'cool.json', to-json my-obj;
20:38 optikalmouse nice :D
20:43 newbie1 joined #perl6
20:45 DrForr In passing I just noticed that there's a  language/ page for lists and sets, not one for hashes. Something *else* to add to my list of documentation.
20:53 newbie1 joined #perl6
20:56 xq joined #perl6
20:56 xq left #perl6
20:57 ab6tract joined #perl6
21:00 mcmillhj joined #perl6
21:02 ab6tract perl6 -MHTTP::UserAgent -e 'say HTTP::UserAgent.new.get("http://google.com")' # Failed to resolve host name
21:02 ab6tract google.com is accessible via ping/curl/browser/etc
21:05 ab6tract and LWP::Simple doesn't seem to survive when run many times in parallel ('could not parse headers')
21:06 ab6tract what started as a benchmark against shelling out to curl to via qq:x has led to the realization that this shelling out seems to be the best option
21:06 ab6tract s/best/only/
21:08 mcmillhj joined #perl6
21:09 timotimo we're using libuv's dns resolving stuff, i think?
21:11 timotimo maybe that has some problem with something
21:13 geraud joined #perl6
21:14 ugexe there were problems resolving IPv6  i think
21:15 ugexe additionally I think http://google.com forwards to https, so you need IO::Socket::SSL installed to properly hit it
21:16 ab6tract ugexe: I thought that might be the case, still seeing the same issue
21:17 mcmillhj joined #perl6
21:17 ab6tract i have now tried adding Net::Curl::Easy to the mix
21:17 ab6tract it is also unhappy
21:19 BrassLantern joined #perl6
21:20 ugexe what about this
21:20 ugexe use IO::Socket::SSL; my $ssl = IO::Socket::SSL.new(:host<google.com>, :port(443)); $ssl.print("GET / HTTP/1.1\r\nHost:www.google.com​\r\nConnection:close\r\n\r\n"); say $ssl.get
21:22 ugexe re: IPv6 https://rt.perl.org/Public/​Bug/Display.html?id=123282
21:23 optikalmouse DrForr: can some aliases be added to the languages list? I was looking for multiple method dispatch and I think the search bar showed the OO page but I couldn't find the docs on it.
21:23 optikalmouse in language
21:25 stmuk joined #perl6
21:26 Xliff Does nqp::index work with Buf?
21:28 ugexe m: say Buf.new(0,1,2,3,4,5,6).contents.index(3,4); # if you don't care about laziness
21:28 camelia rakudo-moar 466770: OUTPUT«6␤»
21:30 ab6tract ugexe: HTTP::UserAgent fails regardless of what url i give it, IDK
21:31 ab6tract ugexe: https://gist.github.com/ab5tract/​ce9b7045dcb5e0c2c215883d2688b479
21:32 ugexe ab6tract: you'd need to test a site without IPv6 assuming you can hit an IPv4 address fine
21:34 ab6tract ugexe: like i said, I am not strictly testing google.com
21:34 ab6tract sorry for the bad example
21:34 ab6tract huh...
21:34 ugexe lots of site have ipv6 support
21:34 labster joined #perl6
21:35 itaipu joined #perl6
21:35 ab6tract ugexe: first, i don't think there should be any such barriers to using one of our native libraries
21:35 ab6tract if curl can hit the url, http-useragent should be able to as well
21:35 ugexe right, thats why there is a ticket filed above
21:36 ab6tract second, you were right, i had been using the google case too frequently
21:37 ab6tract http-useragent does find my site at http://fys.wtf
21:37 ab6tract but it will still not do the full 1000 requests
21:37 ab6tract that code i have just shared should make it easy to test for yourself
21:37 ugexe I'm familiar with most of this from writing net::http
21:38 ab6tract so, familiar with the fact that all the other libraries fall down? :)
21:38 ugexe and one persons connection may not use IPv6 when anothers does
21:39 mcmillhj joined #perl6
21:39 ugexe sure. zef shells out for all its fetching adapters
21:40 ab6tract great
21:40 ugexe originally it used the code that became net::http. obviously the shell approach worked better
21:41 optikalmouse joined #perl6
21:42 ab6tract ugexe: and now it seems that net::http doesn't enjoy attempts to load it
21:43 harmil_wk Is there any reason that someone would write: return unless [and] test($w1, $w2), test($w2, $w3), test($w3, $w4);
21:43 harmil_wk It's the same number of characters as: return unless test($w1, $w2) and test($w2, $w3) and test($w3, $w4);
21:44 harmil_wk ab6tract: that's a wonderful turn of phrase...
21:44 timotimo personally, i'd "all" that :P
21:44 timotimo saves 2 characters
21:44 sQuEE` joined #perl6
21:44 harmil_wk timotimo: all might have been problematic, I'm not sure. $w1, etc. are all junctions in this example.
21:45 harmil_wk It's from http://rosettacode.org/wiki/Amb#Perl_6
21:45 timotimo you can nest junctions
21:47 xfix joined #perl6
21:48 riatre joined #perl6
21:48 ab6tract sorry ugexe, i was holding that module wrong. use/import is fine
21:48 hoelzro joined #perl6
21:48 integral joined #perl6
21:49 harmil_wk timotimo: I know, I just don't know if there was some subtle interaction, here. There's some comments about any vs. all being necessary because of subtle interactions, so I wasn't sure if they avoided another level of junctioning for that reason.
21:49 dalek doc: 1d2e9a7 | ugexe++ | doc/Type/List.pod6:
21:49 dalek doc: Clarify argless pick/roll behavior
21:49 dalek doc: review: https://github.com/perl6/doc/commit/1d2e9a7e67
21:49 harmil_wk More in terms of comprehension rather than syntax
21:49 timotimo there's a thing when you have any and all mixed into the same call
21:49 timotimo it'll execute one kind before the other
21:49 harmil_wk "pick/roll" behavior? Was I just pickrolled?
21:50 harmil_wk timotimo: oh, interesting.
21:51 jkva joined #perl6
21:51 hobbs joined #perl6
21:51 hobbs joined #perl6
21:51 adrusi joined #perl6
21:52 roguelazer joined #perl6
21:52 rodarmor joined #perl6
21:52 TeamBlast joined #perl6
21:53 mcmillhj joined #perl6
21:53 chansen_ joined #perl6
21:54 mrsolo joined #perl6
21:54 PotatoGim joined #perl6
21:57 travis-ci joined #perl6
21:57 travis-ci Doc build failed. Nick Logan 'Clarify argless pick/roll behavior'
21:57 travis-ci https://travis-ci.org/perl6/doc/builds/160299240 https://github.com/perl6/doc/com​pare/417fbfe0f0fd...1d2e9a7e67e1
21:57 travis-ci left #perl6
21:59 tadzik joined #perl6
22:00 Glitchy joined #perl6
22:00 jsimonet joined #perl6
22:00 ugexe joined #perl6
22:00 domm joined #perl6
22:02 lizmat joined #perl6
22:07 rindolf joined #perl6
22:09 stundenull joined #perl6
22:13 woolfy joined #perl6
22:13 mcmillhj joined #perl6
22:23 cog__ joined #perl6
22:24 mcmillhj joined #perl6
22:26 dalek doc: f8c5be4 | MasterDuke17++ | doc/Type/Signature.pod6:
22:26 dalek doc: Fix typo in Signature
22:26 dalek doc: review: https://github.com/perl6/doc/commit/f8c5be4337
22:26 skids joined #perl6
22:34 mohae joined #perl6
22:40 mcmillhj joined #perl6
22:42 harmil_wk I wrote up a RC entry for jumps at: http://rosettacode.org/wiki/Jump_anywhere#Perl_6
22:42 harmil_wk If anyone has time to review...
22:45 travis-ci joined #perl6
22:45 travis-ci Doc build passed. MasterDuke17 'Fix typo in Signature'
22:45 travis-ci https://travis-ci.org/perl6/doc/builds/160307434 https://github.com/perl6/doc/com​pare/1d2e9a7e67e1...f8c5be4337a0
22:45 travis-ci left #perl6
22:55 mcmillhj joined #perl6
22:57 bjz joined #perl6
22:57 ugexe ab5tract_: using net::http I get 110-120. if i add a `sleep 1` after each request it gets to 400-500. maybe thats a clue for something socket related...
22:58 timotimo what gets to those values?
22:58 TimToady harmil_wk: this is a slight lie: Will unwind the stack until either some `CATCH` block intercepts the specific exception type or we exit the program.
22:58 SmokeMachine____ joined #perl6
22:58 TimToady the unwinding does not happen until after the CATCH block executes, in case we want to .resume
22:58 ugexe timotimo: https://gist.github.com/ab5tract/​ce9b7045dcb5e0c2c215883d2688b479
22:58 TimToady also, we have the entire dynamic scope of the error available to the handler
22:59 ugexe so a bunch of threads trying to make 1000 total http requests. the numbers i posted are how many went through before it just seemingly stops
23:00 ugexe all the pure perl http clients appear to never make it close to the 1000 requests. but the one shelling out to curl does
23:01 ab6tract joined #perl6
23:03 ugexe for whatever reason the threads quickly and quietly die off until there are 1 or 2 left. those eventually die as well but they make up half the total requests
23:04 ugexe naturally no errors are thrown
23:04 AlexDaniel yeah, can confirm that curl is more reliable…
23:05 ab6tract ugexe: i've noted that this invocation will flap: perl6 -MNet::HTTP::GET -e 'await do for ^16 -> $i { start { say "$i: " ~ Net::HTTP::GET("http://fys.wtf").body.decode("utf8").comb("stupid") } }'
23:06 ab6tract gist has been updated
23:06 ab6tract mostyl cosmetic though
23:07 ab6tract *mostly
23:07 ab6tract and with that typo, i'm going to sleep :)
23:09 timotimo mo style, mo problems
23:09 ugexe for some reason http::useragent does not get a benefit from a `sleep 1`
23:09 timotimo sleep 1 will block a thread for one second to make it unavailable for receiving new work or doing stuff
23:09 timotimo you could try building a scheduler with a lower max-threads for this and see if that helps any?
23:10 timotimo or rather whether it has the same kind of effect
23:10 cpage_ joined #perl6
23:11 * ab6tract will take a look at using perl 5 fetchers tomorroq
23:11 ab6tract gahh! ok: bed time :)
23:11 ugexe right, and it also could mean the server is less likely to cause some unexpected socket close
23:14 mcmillhj joined #perl6
23:18 SmokeMachine____ if someone get some time, could (please) comment/critic this module? https://github.com/FCO/Heap
23:25 khw joined #perl6
23:26 itaipu joined #perl6
23:31 mcmillhj joined #perl6
23:31 BrassLantern joined #perl6
23:31 BrassLantern joined #perl6
23:32 BrassLantern joined #perl6
23:34 BenGoldberg joined #perl6
23:35 BrassLantern joined #perl6
23:41 MasterDuke SmokeMachine____: are you sure you want '==' for your eqv?
23:41 MasterDuke m: say <a ab> ~~ <aa b>
23:41 camelia rakudo-moar ad5336: OUTPUT«False␤»
23:41 MasterDuke m: say <a ab> == <aa b>
23:41 camelia rakudo-moar ad5336: OUTPUT«True␤»
23:42 MasterDuke m: say <a ab> == <a a b>
23:42 camelia rakudo-moar ad5336: OUTPUT«False␤»
23:42 mcmillhj joined #perl6
23:42 MasterDuke m: say <a ab> ~~ <a a b>
23:42 camelia rakudo-moar ad5336: OUTPUT«False␤»
23:42 MasterDuke m: say <a ab> == <c d>
23:42 camelia rakudo-moar ad5336: OUTPUT«True␤»
23:42 SmokeMachine____ Yes, I do not want that...
23:43 MasterDuke i think == for lists just checks that they have the same number of elems
23:48 BenGoldberg Perl6's == operator is the same as perl5's: it just checks for numeric equality.
23:48 newbie1 joined #perl6
23:48 BenGoldberg m: say <a b> == 2;
23:48 camelia rakudo-moar ad5336: OUTPUT«True␤»
23:50 BenGoldberg Also, note that == is not truly aware of lists, it only cares that it's arguments can be converted to Number.
23:50 BenGoldberg m: say <a b>.Number;
23:50 camelia rakudo-moar ad5336: OUTPUT«Method 'Number' not found for invocant of class 'List'␤  in block <unit> at <tmp> line 1␤␤»
23:50 BenGoldberg m: say <a b>.Int;
23:50 camelia rakudo-moar ad5336: OUTPUT«2␤»
23:51 BenGoldberg m: say Int.^roles
23:51 camelia rakudo-moar ad5336: OUTPUT«((Real) (Numeric))␤»
23:51 BenGoldberg m: say <a b>.Numeric;
23:51 camelia rakudo-moar ad5336: OUTPUT«2␤»
23:51 BenGoldberg Err, pretend I said, Numeric, not Number.
23:56 ka joined #perl6
23:58 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo