»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:08
Zoffix joined
|
|||
Zoffix | . | 00:08 | |
.tell melezhik your attempt to gather captures may be hindered with what I think is a bug: irclog.perlgeek.de/perl6/2016-09-15#i_13212176 | 00:09 | ||
yoleaux | Zoffix: I'll pass your message to melezhik. | ||
Zoffix | m: my $m = 'a 123' ~~ /(\d\d\d)/; dd [$m.list]; | ||
camelia | rakudo-moar 2c95f7: OUTPUT«[Match.new(ast => Any, list => (), hash => Map.new(()), orig => "a 123", to => 5, from => 2)]» | ||
Zoffix | m: my $input = '(\d\d\d)'; my $m = 'a 123' ~~ /<$input>/; dd [$m.list]; | ||
camelia | rakudo-moar 2c95f7: OUTPUT«[]» | ||
00:10
infina left
|
|||
Zoffix | RT: rt.perl.org/Ticket/Display.html?id=129271 | 00:11 | |
00:13
infina joined
00:16
infina left,
infina joined
|
|||
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:19
nadim left
00:23
Actualeyes left
00:31
awwaiid joined
00:34
labster left
00:37
yqt left
00:48
espadrine left
|
|||
awwaiid | I've arrived in STL for StrangeLoop! | 00:51 | |
00:53
labster joined
01:00
canopus left
01:01
canopus joined
01:02
Pierre_ joined
|
|||
tailgate | is there a difference between the different ways you mar a function's return type? | 01:06 | |
i.e sub foo(--> Int) or sub foo() returns Int | |||
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:08
dataangel left
01:09
dataangel joined
01:10
rgrinberg left
01:14
cpage_ joined
01:19
kalkin- joined
01:22
labster left,
itaipu joined
01:23
kalkin-_ left
01:25
Actualeyes joined
01:29
itaipu left
01:30
itaipu joined
01:32
poohman_ joined
|
|||
awwaiid | bleh. Not being able to paste multiple lines into the REPL is annoying. Need to fix that. | 01:32 | |
01:33
mcmillhj left
|
|||
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」» | ||
pmichaud | m: my $input = '(\d\d\d)'; my $m = 'a 123' ~~ /$0=<$input>/; say $m | ||
camelia | rakudo-moar 2c95f7: OUTPUT«「123」 0 => 「123」 0 => 「123」» | ||
01:35
poohman left
01:39
mcmillhj joined
01:40
labster joined
01:43
mcmillhj left
01:44
ilbot3 left
01:45
zengargoyle joined
01:47
ilbot3 joined
01:51
cog_ left
01:56
mcmillhj joined
01:57
cognominal joined
02:00
mcmillhj left
02:05
MilkmanDan left
02:06
MilkmanDan joined
02:09
mcmillhj joined
02:15
mcmillhj left,
MilkmanDan left
02:16
MilkmanDan joined
02:23
noganex joined
02:26
noganex_ left
02:29
mcmillhj joined
02:30
labster left,
rgrinberg joined
02:31
shantanu joined,
labster joined
|
|||
shantanu | Hello #perl6! | 02:32 | |
02:34
mcmillhj left
02:37
itaipu left
02:39
itaipu joined
02:46
mcmillhj joined
02:52
mcmillhj left
03:01
mcmillhj joined
|
|||
AlexDaniel | o/ | 03:05 | |
03:07
mcmillhj left
03:10
khw left
|
|||
Woodi | hi :) | 03:12 | |
raydiak | \o | 03:14 | |
03:14
Pierre_ left
03:16
Pierre_ joined
03:20
mcmillhj joined
03:21
Pierre_ left
03:28
Actualeyes left
03:32
mcmillhj left
03:33
canopus left
03:35
mcmillhj joined
03:39
canopus joined,
AlexDaniel left
03:41
mcmillhj left
03:46
mcmillhj joined
03:50
Pierre_ joined
03:51
mcmillhj left
04:02
goxiao joined
04:04
zengargoyle left
04:09
Pierre_ left
04:11
wamba joined
04:15
Pierre_ joined
04:16
mcmillhj joined
04:18
poohman_ left,
Pierre_ left
04:19
BenGoldberg left,
Pierre_ joined
04:20
mcmillhj left
|
|||
sammers | hi perl6 | 04:22 | |
04:22
poohman joined
04:23
itaipu left
|
|||
skids | o/ | 04:31 | |
04:32
mcmillhj joined
04:34
Actualeyes joined
|
|||
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)))» | ||
sammers | hmm, is there any other way to merge Maps together? | 04:35 | |
04:36
mcmillhj left
|
|||
sammers | Hash is a bit simpler | 04:37 | |
m: my %h1 = id => 1234; my %h2 = score => 54321; say %(%h1, %h2); | |||
camelia | rakudo-moar 2c95f7: OUTPUT«{id => 1234, score => 54321}» | ||
04:42
mcmillhj joined
04:44
Pierre_ left
04:47
mcmillhj left
04:48
wamba left
04:49
Pierre_ joined
04:53
Pierre_ left
04:57
Cabanossi left
04:59
Pierre_ joined
05:00
Cabanossi joined
05:04
Pierre_ left,
mohae_ joined
05:05
skids left
05:06
mohae left
05:08
Pierre_ joined
|
|||
El_Che | DrForr: cheers! (O'Reilly) | 05:10 | |
05:12
Sgeo_ left
05:13
Pierre_ left
05:14
mcmillhj joined
05:17
rgrinberg left
05:19
mcmillhj left
05:24
domidumont joined
05:26
Pierre_ joined
05:28
domidumont left
05:31
Pierre_ left
05:32
ufobat joined
05:33
wamba joined
05:36
Sgeo joined
05:39
zengargoyle joined
|
|||
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
05:44
Pierre_ joined
05:45
mcmillhj left
05:48
labster left
05:49
Pierre_ left,
wamba left
05:54
domidumont joined
06:02
Pierre_ joined
06:03
albongo left
06:07
albongo joined,
Pierre_ left
06:09
andrzejku joined
06:13
goxiao left
06:14
mcmillhj joined
|
|||
konobi | is there documentation of all the set operators available? | 06:17 | |
06:19
mcmillhj left,
Pierre_ joined
|
|||
sammers | konobi: have you seen this? docs.perl6.org/language/setbagmix | 06:20 | |
konobi | thanks! | ||
sammers | np | ||
konobi | is larry around at all? | 06:21 | |
sammers | haven't seen him today. | 06:24 | |
06:28
firstdayonthejob joined
06:30
CIAvash joined,
Pierre_ left
|
|||
konobi | any other linguists around? | 06:33 | |
06:38
Pierre_ joined,
_slade_ left
06:43
mcmillhj joined,
Pierre_ left
06:46
firstdayonthejob left
06:47
mcmillhj left
06:48
labster joined
06:49
darutoko joined
06:52
fdsfds joined
06:53
fdsfds left,
nadim joined
06:58
djbkd joined
07:00
fdsfds joined
07:01
mcmillhj joined
|
|||
fdsfds | is there any information about perl6 performance, benchamarks, has it been improved lately? | 07:02 | |
moritz | fdsfds: there have been blog posts about that on perl6.party/ | 07:04 | |
fdsfds | yeah, but the article about performance was posted in april, it's a long ago | 07:06 | |
07:06
mcmillhj left
|
|||
konobi | moarvm has been making good incremental improvements | 07:06 | |
07:08
amalia_ left
|
|||
fdsfds | are there any benchmarks? | 07:09 | |
07:09
cpage_ left,
amalia_ joined
|
|||
El_Che | fdsfds: tux posts results about his module very regularly | 07:10 | |
fdsfds | El_Che: who's tux? | 07:12 | |
moritz | the maintainer of perl 5's Text::CSV_XS, iirc | 07:13 | |
El_Che | idd | ||
07:14
rindolf joined
|
|||
El_Che | I don't know if he moved the results to -dev or -toolchain | 07:14 | |
07:17
fdsfds left
07:20
mcmillhj joined
07:22
zakharyas joined
|
|||
konobi | also, is there any company using perl6 heavily (so time investment) ? | 07:24 | |
07:24
Pierre_ joined,
mcmillhj left
07:26
wamba joined
07:28
Pierre_ left
|
|||
zengargoyle | fdsfds: 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:34 | |
07:35
simonsharry joined,
poohman left
|
|||
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:37 | |
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 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 modules.perl6.org/ | ||
fritz_ | moritz: please forward the mail to any of the other German speaking experts in case you can't do the course. | ||
moritz | fritz_: will do | 07:39 | |
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 | |
07:40
mcmillhj joined
07:41
cgfbee left,
poohman joined,
pmurias joined
|
|||
moritz | simonsharry: and as for phasers, one thing you can do to find examples is to clone github.com/moritz/perl6-all-modules which contains all public perl 6 modules, and then use 'git grep' to search for some | 07:41 | |
simonsharry: for example git grep --word LEAVE | |||
simonsharry | Will do, thanks moritz. | 07:42 | |
07:42
Pierre_ joined
07:44
Pierre_ left
07:45
Pierre_ joined,
mcmillhj left
07:54
mcmillhj joined
|
|||
lizmat | fritz_: No problem, if moritz is picking this up, he can do a better job than I can :-) | 07:58 | |
07:59
mcmillhj left
08:02
mohae joined,
jonas2 joined,
Zoffix__ joined
|
|||
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:03 | |
lizmat | well, if no native-german speaker can give the course, I can :-) | 08:04 | |
08:05
mohae_ left,
mcmillhj joined
08:06
Zoffix left
|
|||
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:06 | |
08:10
mcmillhj left,
rindolf left
08:15
nadim left,
nadim joined
08:18
rindolf joined
08:19
RabidGravy joined
08:21
zakharyas left
|
|||
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:23 | |
08:28
Zoffix__ is now known as Zoffix
08:29
Zoffix left
08:30
nadim left
|
|||
El_Che | DrForr: yeah, I saw that. On the otherhand, some troll will have a full belly by now :) | 08:30 | |
DrForr | Not *really* blaming ORA, but I really would have liked a chance to review things before they put up the landing page. | 08:32 | |
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:34 | ||
08:43
Actualeyes left
08:47
andrzejku left
|
|||
El_Che | DrForr: silly, if you ask me. But out of your hands. It doesn't change that it's great news | 08:50 | |
\o/ | |||
08:51
andrzejku joined
|
|||
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» | ||
Woodi | how to use $.-type attrs ?? | 08:53 | |
08:53
mcmillhj joined
08:56
rightfold left
08:58
mcmillhj left
08:59
simonsharry left
|
|||
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» | ||
sammers | Woodi: ^^^^ | ||
09:23
TEttinger left
|
|||
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
09:34
mcmillhj left,
CIAvash left
09:36
eliasr joined
09:37
CIAvash joined
09:38
jkramer left
09:41
cpage_ joined
09:45
labster left
09:57
zakharyas joined
09:58
CIAvash left
|
|||
dalek | c: a2c9940 | (Armand Halbert)++ | doc/Language/variables.pod6: Fixed confusing wording in the state variables docs |
10:00 | |
c: 45635a0 | RabidGravy++ | doc/Language/variables.pod6: Merge pull request #907 from ahalbert/906 Fixed confusing wording in the state variables docs |
|||
10:01
nadim joined,
bob777 left
10:03
mcmillhj joined
|
|||
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 blog.hellojs.org/el-capitan-and-be...rce=latest and blog.hellojs.org/spying-on-the-dom....mazdywc41 as articles that he was hoping to see for Perl/Perl6. Not that I have the time to help right now, but after conf | 10:06 | |
10:08
mcmillhj left
10:15
mcmillhj joined,
MilkmanDan left
10:16
MilkmanDan joined
10:19
mcmillhj left
10:20
Pierre_ left
10:26
Pierre_ joined
10:31
Pierre_ left
|
|||
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:33 | |
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:36 | |
10:54
Pierre_ joined
|
|||
Woodi | :w | 10:56 | |
10:57
yqt joined
10:58
wamba left
|
|||
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:01 | |
11:03
mcmillhj joined
11:04
Pierre_ left
11:05
andrzejku left
|
|||
DrForr | Yep. I was just noticing a potential hole in what we're talking about in blogging and such. | 11:05 | |
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:07 | |
11:08
mcmillhj left
|
|||
raydiak | Oh yes, bloggers are another great example | 11:12 | |
11:12
Pierre_ joined,
Pierre_ left
11:13
rindolf left
|
|||
timotimo | oh, it's raydiak! :) | 11:14 | |
raydiak | hiya timo! how goes it? | ||
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? | ||
raydiak | I'm great! Got a good job, talked my boss into using perl instead of php, and moved to Austin, TX. | 11:16 | |
timotimo | \o/ | 11:17 | |
perl is a definite big step up from php | |||
tadzik | nice :) | 11:18 | |
raydiak | No kidding...big step up, and very nice indeed :) | ||
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? | ||
raydiak | But being up all night loving perl instead of loathing php is something I'm truly thankful for | 11:20 | |
nope not cpanel, our own products. can't talk about it much yet though, non-disclosure agreement | |||
DrForr | Ah. | 11:22 | |
11:22
bjz joined
|
|||
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:23 | |
11:27
araujo left
11:28
mcsnolte left
11:33
araujo joined
|
|||
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:35 | |
11:35
araujo left
11:36
mcmillhj joined,
araujo joined
11:38
araujo left
|
|||
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 | |
11:38
araujo joined
11:39
rindolf joined,
skids joined,
zakharyas left
11:40
skids left,
araujo left
11:41
araujo joined
|
|||
timotimo | oh, really? | 11:41 | |
11:41
mcmillhj left
|
|||
timotimo | isn't that just "it's currently performing very bad, but bad performance will be improved in the future"? | 11:41 | |
lizmat | timotimo: please remember that requirements in an agile environment can change quickly | 11:44 | |
11:44
bjz left
|
|||
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 | |
11:45
kent\n left
|
|||
lizmat | oops, read raydiak;'s comment wrong :-) | 11:45 | |
11:45
kent\n joined
|
|||
lizmat | raydiak: yes, the goal is to be faster than perl 5 :-) | 11:45 | |
www.youtube.com/watch?v=wxU8OXKGNKc # stmuk's talk at YAPC::EU | 11:46 | ||
11:46
mcmillhj joined
|
|||
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 | ||
basically: hire a perl6 core dev :P | 11:47 | ||
lizmat | timotimo: disagree :) | ||
that kind of optimization effects I expect from merging brrt's work on the JIT | |||
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 | ||
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
mcmillhj left
|
|||
lizmat | timotimo: any suggestions of areas to look into aa far as you know ? | 11:51 | |
11:52
ptolemarch joined
|
|||
timotimo | difficult to say. i read everywhere that you have to measure before you optimize ;) | 11:53 | |
so we'd have to find a few benchmarks first that show some flaw | |||
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 | ||
and we only actually allocate the object if something really, really, really wants to have the object | |||
11:55
kaare__ joined
|
|||
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 | ||
timotimo | nine: yes, almost criminally lazy ;) | ||
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 | ||
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" | ||
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 | ||
timotimo | aye | ||
still it's hard to know when you can get away with it | |||
that's the reason we don't have escape analysis yet ;- | |||
arnsholt | Definitely, definitely | ||
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 =) | ||
timotimo | jnthn and masak started on it a year or two ago, but didn't pull through yet | ||
arnsholt | Oh, neato! | ||
I'm way, way out of the loop on a lot of this stuff these days =( | |||
11:59
Pierre_ joined
|
|||
timotimo | these days it's mostly "lizmat glances at a core builtin, and suddenly it's 10x faster" | 11:59 | |
11:59
mcmillhj joined
|
|||
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
|
|||
timotimo | lizmat: the internals are allowed to be less beautiful; only surgeons get to see it when they cut open the outside ;) | 12:00 | |
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 | ||
our internals now basically resemble lisp :P | |||
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 | ||
arnsholt | It's a tradeoff, definitely | ||
timotimo | i remember that, too :( | ||
arnsholt | But as speed and elegance in code are frequently opposed, we have to choose | 12:02 | |
As an example of favouring elegance and simplicity, consider CPython | |||
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 | ||
timotimo | hm, right | ||
arnsholt | Yeah, I'm not familiar with the codebase, but apparently it's a problem with making CPython go faster | ||
timotimo | and then something like pypy has to come along for the performance part :P | ||
12:04
mcmillhj left
|
|||
timotimo | something i personally would like to see is less code generated for trying to call .sink on stuff | 12:06 | |
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:07 | ||
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 | |
however, I also recognize the need to compromise with other factors, chiefly performance | |||
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 | ||
maybe that's a silly worry, I don't know | |||
timotimo | if we had macros, we could perhaps make that stuff a bit more concise and readable | ||
nine | Well... | ||
timotimo | that's a truth, masak. i 100% expect that to happen ;( | ||
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... | ||
masak | macros are on the way. 007 is working as intended there, showing what will be possible. | ||
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
|
|||
masak | perhaps we would do well to keep unoptimized code around in comments (or in some other way) | 12:15 | |
so that something automated could spectest and perftest on a regular basis | |||
and flag things up as "hey, this optimization does nothing anymore -- hooray!" | |||
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 | ||
timotimo | hah, ouch | ||
masak: well, we already have #?if stuff | |||
arnsholt | Because 2010s CPUs are different from 1980s CPUs | 12:16 | |
lizmat | afk& | ||
masak | timotimo: that may or may not be better than what I proposed | ||
timotimo | we can keep the code honest by generating both variants of CORE.setting on travis | ||
masak | aye | ||
timotimo | and then spec test | ||
12:16
itaipu left,
itaipu joined
|
|||
nine | lizmat++'s optimized versions frequently also fix bugs | 12:18 | |
12:19
mcmillhj left
|
|||
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 | |
we'll end up with bugged clean code in the ‘then’ that we'll also have to fix | |||
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/ | ||
timotimo | \o/ | ||
gnite raydiak | 12:22 | ||
12:25
mcmillhj joined
|
|||
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:28 | |
masak | +1 | 12:29 | |
timotimo | OK | ||
12:29
Venkatesh joined
|
|||
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. | ||
Which is something jnthn++ has done often enough to not need as much digging anymore :) | 12:30 | ||
12:30
mcmillhj left
|
|||
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
|
|||
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. | ||
grondilu | well if you take the sentence *litterally*, sure. | ||
jnthn | And it sometimes is, but it's the exception, not the norm. | ||
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
|
|||
arnsholt | Yeah, I agree. Internals are frequently less scasry than one might expect | 12:37 | |
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... | ||
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. :)) | ||
Well, they often involve, anyway :) | 12:40 | ||
12:41
Praise left,
mcmillhj left,
Venkatesh left
|
|||
arnsholt | Oh, lattices are fairly straightforward as far as their theoretical construction goes | 12:43 | |
Of course, that doesn't always help with grokking uses of them =) | 12:44 | ||
But it's basically just a DAG with some special properties | |||
12:45
Praise joined,
Praise left,
Praise joined,
poohman_ joined
|
|||
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:46 | |
timotimo hasn't yet heard of this yet | 12:47 | ||
12:47
poohman left
|
|||
arnsholt | The Wikipedia page discusses it in terms of partially ordered sets, but for a computer scientists a DAG is more familiar | 12:47 | |
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 | ||
jnthn | Hm, so the think looks like a diamond :) | 12:49 | |
*thing | |||
arnsholt | Yeah | ||
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 | ||
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 | |||
jnthn | Aha | 12:52 | |
12:53
bioduds joined
|
|||
jnthn | This makes some sense; thanks! | 12:53 | |
12:54
jkramer joined
|
|||
jkramer | Ahoy! | 12:54 | |
Is there a more efficient way to look for bytes or byte sequences in a Buf/Blob than looping over its bytes? | |||
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 | ||
moritz | not sure how that compares in efficiency | ||
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:56 | |
12:58
rudolfochrist joined
13:03
mcmillhj joined
13:06
zakharyas joined
|
|||
nine | jkramer: do what moritz++ suggested with subbufs? | 13:10 | |
13:10
araujo_ joined,
cdg joined
13:12
araujo_ left
13:13
rgrinberg joined,
araujo_ joined
13:14
araujo left
13:15
araujo_ left
13:16
araujo_ joined,
bjz joined
13:17
bjz left
13:18
araujo_ left,
bjz joined,
araujo_ joined
13:20
araujo_ left,
araujo_ joined
13:21
dryx joined
13:22
araujo_ left
13:23
dalek left,
araujo_ joined,
AlexDaniel joined
13:24
dalek joined,
ChanServ sets mode: +v dalek
13:25
araujo_ left,
araujo_ joined
13:27
skids joined,
araujo_ left
13:28
araujo_ joined
13:30
bjz left,
araujo_ left,
araujo_ joined
13:31
bjz joined
13:32
araujo_ left
|
|||
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
MilkmanDan left,
araujo_ joined
13:37
MilkmanDan joined,
araujo_ left
|
|||
bioduds | how does simple math works in perl6? | 13:37 | |
13:38
araujo_ joined
|
|||
bioduds | like Math.Random for instance? | 13:38 | |
moritz | m: say 1 + 4 # simple math | ||
camelia | rakudo-moar 2c95f7: OUTPUT«5» | ||
bioduds | like other languages have Math class for instance | 13:39 | |
is there a rand function? | |||
13:40
araujo_ left
|
|||
moritz | m: say rand | 13:40 | |
camelia | rakudo-moar 2c95f7: OUTPUT«0.945241411041802» | ||
moritz | bioduds: that was too hard for you to try out on your own, right? :-) | ||
bioduds | yep, sorry | ||
lazy here | |||
13:40
araujo_ joined
|
|||
lizmat | m: say ^10 .pick | 13:40 | |
camelia | rakudo-moar 2c95f7: OUTPUT«5» | ||
lizmat | m: say ^10 .pick | ||
camelia | rakudo-moar 2c95f7: OUTPUT«5» | ||
lizmat | m: say ^10 .pick | ||
camelia | rakudo-moar 2c95f7: OUTPUT«8» | ||
lizmat | *phew* :-) | ||
m: say ^10 .pick | |||
camelia | rakudo-moar 2c95f7: OUTPUT«5» | ||
13:40
bjz_ joined
|
|||
lizmat | hmmm | 13:40 | |
m: say ^10 .pick | 13:41 | ||
camelia | rakudo-moar 2c95f7: OUTPUT«6» | ||
moritz would have been very amused if the third try would have been 5 too :-) | |||
bioduds | pick is nice | ||
can I range pick? | |||
like 10..1000.pick? | |||
moritz | bioduds: try it! | 13:42 | |
lizmat | sure | ||
bioduds | cool | ||
13:42
bjz left
|
|||
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
araujo_ left
|
|||
lizmat | huh? | 13:42 | |
moritz | m: say 10..10000 .pick | ||
camelia | rakudo-moar 2c95f7: OUTPUT«10..10000» | ||
lizmat | m: (10..10000).pick.say | ||
camelia | rakudo-moar 2c95f7: OUTPUT«53» | ||
moritz | parsing weirdness? | ||
13:43
araujo_ joined
|
|||
lizmat | yeah probably | 13:43 | |
commute to NR.pm meeting& | |||
13:43
lizmat left
13:44
aries_liuxueyang left
|
|||
jnthn | Probably confusing it with ^10000 .pick; here prefix:<^> binds tigether than infix:<.> | 13:44 | |
whereas infix:<.> is tighter than infix:<..> | |||
13:45
AlexDani` joined
|
|||
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
|
|||
jkramer | What does the stuff after SORRY! mean? | 13:45 | |
(It's a pretty long stack trace when I do it locally) | |||
moritz | it's confused :-) | 13:46 | |
basically WHAT is not a normal method, but something special | |||
bioduds | you have to enclose in () | ||
moritz | and that special form doesn't seem to work with the . operator, just when call it without a space | ||
bioduds | like (10..100).pick | ||
works here | 13:47 | ||
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 | ||
camelia | rakudo-moar 2c95f7: OUTPUT«(Range)» | ||
jkramer | Ah nice :D | ||
13:49
AlexDaniel left
13:51
woolfy left
|
|||
bioduds | $.galaxies = ($.smallest-number-of-galaxies..$.greatest-number-of-galaxies).pick; | 13:51 | |
13:52
AlexDani` is now known as AlexDaniel
14:00
jmark left
14:03
AlexDaniel left
|
|||
ugexe | technically wouldn't you use `roll` for such a random value | 14:10 | |
you wouldnt do `($galaxies1, $galaxies2) = (1..10).pick(2)` for instance | 14:12 | ||
14:13
zakharyas left
14:14
mcmillhj left
14:16
rudolfochrist left
14:17
cooper_ joined
|
|||
moritz | depends on whether you want them to be always distinct or not | 14:19 | |
14:20
cooper left
14:23
mcmillhj joined
|
|||
ugexe awaits the day work code review involves zero argument pick vs roll | 14:25 | ||
14:26
Actualeyes joined
14:27
khw joined
|
|||
moritz | we don't do enough randomness to discuss that often here :-) | 14:27 | |
mst | the only thing that's random in here is the puns :D | 14:28 | |
14:37
mcmillhj left
14:39
mcmillhj joined
|
|||
ugexe | m: say ().pick(1); say ().pick | 14:45 | |
camelia | rakudo-moar 2c95f7: OUTPUT«()Nil» | ||
Xliff | <moritz> you could decode as latin-1 and then use the index function | 14:48 | |
Buf could probably use an .index method for byte sequences where decoding is not necessary. | |||
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 $g20(Any)» | ||
Xliff | m: my ($g1, $g2); ($g1, $g2) = (^20).pick(2); say $g1; say $g2 | ||
camelia | rakudo-moar 2c95f7: OUTPUT«17» | ||
Xliff | m: my ($g1, $g2); ($g1, $g2) = (^20).pick(2); say $g1; say $g2 | ||
camelia | rakudo-moar 2c95f7: OUTPUT«17» | ||
Xliff | Interesting | ||
m: my ($g1, $g2); ($g1, $g2) = (^20).roll(2); say $g1; say $g2 | 15:03 | ||
camelia | rakudo-moar 2c95f7: OUTPUT«211» | ||
Xliff | m: my ($g1, $g2); ($g1, $g2) = (^20).roll(2); say $g1; say $g2 | ||
camelia | rakudo-moar 2c95f7: OUTPUT«314» | ||
15:03
Pierre_ left
15:05
mcmillhj left
15:07
mcmillhj joined
|
|||
dalek | c: d658a1b | (Armand Halbert)++ | doc/Language/functions.pod6: Added documetation on function return types. |
15:14 | |
c: 5f8fb85 | RabidGravy++ | doc/Language/functions.pod6: Merge pull request #908 from ahalbert/903 Added documetation on function return types. |
|||
skids | ^^ might want to mention that Nil and Failure are exempt. | 15:18 | |
15:21
dryx left,
ilmari[m] left,
Matthew[m] left,
tadzik left,
M-Illandan left,
Actualeyes left
15:28
itaipu left
15:31
girafe joined
15:37
mcmillhj left,
mcmillhj joined,
lizmat joined
15:39
canopus left
15:40
Actualeyes joined
15:42
domidumont left
15:44
canopus joined
15:51
mcmillhj left
15:54
araujo_ left
16:02
Sgeo left
|
|||
dalek | c: 417fbfe | (Zoffix Znet)++ | doc/Language/functions.pod6: Indicate Nil/Failure are exempt from return constraints |
16:07 | |
16:09
geraud left
16:11
mcmillhj joined
16:15
Sgeo joined
16:16
mcmillhj left
16:17
wamba joined
16:18
geraud joined
16:20
darutoko left
16:24
mcmillhj joined
16:25
acrussell joined
16:29
mcmillhj left
16:38
mcmillhj joined
16:41
wamba left,
kalkin- left
16:42
mcmillhj left
16:49
Guest60789 is now known as matt_
16:52
mcmillhj joined
16:55
cdg left,
canopus left
16:56
canopus joined
16:57
mcmillhj left,
aries_liuxueyang left
16:59
aries_liuxueyang joined
17:05
mcmillhj joined
17:07
ilmari[m] joined
17:09
mcmillhj left
17:10
_slade_ joined
17:15
firstdayonthejob joined
17:16
mcmillhj joined,
yqt left
17:17
firstdayonthejob left
17:19
firstdayonthejob joined
17:24
nadim left
17:26
wamba joined
17:27
zakharyas joined
17:40
yqt joined
17:48
isBEKaml joined
|
|||
isBEKaml | OHHAI, why does the RSS feed entry for p6weekly produce some mojibake for a summary? | 17:49 | |
This is what I see: PHA+VGhpcyB3ZWVrIHNhd.... | 17:50 | ||
and here's the URL to that entry: p6weekly.wordpress.com/2016/09/12/...-youtuben/ | 17:51 | ||
17:51
andrzejku joined
|
|||
DrForr | That looks like base64 encoding, maybe a YouTube URL is getting misinterpreted somewhere? | 17:53 | |
17:53
spider-mario joined
|
|||
isBEKaml | DrForr: that's what I thought, but I don't see any video embedding on the page! | 17:53 | |
Oh, youtube URLs getting mangled into base64. Nice! | 17:56 | ||
DrForr | Heh, I'm just having fun watching people on reddit playing ping-pong with my ORA training submission. | 17:58 | |
isBEKaml | ORA -- Oracle? | 17:59 | |
DrForr | Yep. | ||
isBEKaml | DrForr: www.oreilly.com/live-training/top-1...erl-6.html (:-( | 18:01 | |
I'll be on vacation then, with no access to a compute | |||
*r | |||
18:01
andrzejku left
|
|||
DrForr | Vacation good. | 18:01 | |
18:02
FROGGS joined
|
|||
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 | |
(knowing very little about reddit as I do.) | |||
isBEKaml | DrForr: Don't worry about karma. | 18:04 | |
18:04
cdg joined
|
|||
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) | ||
DrForr | I already have plenty from other sources :) | ||
stmuk_ | DrForr: I suspect its some issue with distributing content votes between servers | 18:05 | |
or the caching or something | |||
18:06
andrzejku joined
|
|||
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:06 | |
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 | ||
mspo | mm format conventions | 18:09 | |
18:09
geraud left
|
|||
stmuk_ | I suspect some language wars people just downvote anything not in their language of choice | 18:09 | |
mspo | reddit does fake up/down numbers on early articles to mess with bots | 18:10 | |
it's normal | |||
18:10
andrzejku left
|
|||
DrForr | Shrug. Only one person has deigned to comment, and that was with the oh-so-helpful "F*ck em." | 18:10 | |
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:11 | ||
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 | ||
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
sftp left
|
|||
DrForr | I don't doubt that it's just people downvoting for the helluvit, I'm just having fun watching. | 18:13 | |
18:13
sftp joined
|
|||
mspo | DrForr: www.reddit.com/r/programmingcirclejerk/ | 18:14 | |
DrForr | Not taking any of this personally or seriously. | 18:15 | |
mst | it seems to be doing fine on r/perl and r/perl6 | ||
r/programming is ... variable | |||
DrForr | Oh, it got shared over to /r/perl, cool. | 18:17 | |
stmuk_ | mspo++ | 18:18 | |
18:19
prammer joined
|
|||
mst | I wonder if r/perl should mention r/perl6 exists instead of claiming it's 'the' subreddit for both | 18:19 | |
mspo | stmuk_: it's so funny (sometimes) | 18:21 | |
the rust-shilling guy has slowed down, though | |||
"did you know that if you used Rust.. fearless concurrency.." | |||
DrForr | OSCON Austin gave everybody free Rust guides. | 18:22 | |
tailgate | It could be worse, PHP is the butt-monkey of languages. | 18:25 | |
mst | PHP is a malignant perl5 templating engine that metastasised. | 18:27 | |
mspo | claim credit | 18:30 | |
php is a decent little economy | |||
TimToady | .oO(half of PHP programmers are in the deplorable basket) |
||
18:30
Actualeyes left
18:31
cdg left
|
|||
mspo | you can build a career around wordpress | 18:31 | |
it's impressive | |||
mst | mspo: I am *hugely* impressed by the PHP *community* | ||
DrForr tacfully refrains from a "Silence of the Lambs" reference. | |||
mspo | you can build a career as a wordpress plugin developer, even | ||
I'm starting to come around to the fact that tech elegance/taste is totally unimportant | 18:32 | ||
but that same argument is made against perl all of the time :) | 18:33 | ||
18:33
tadzik joined,
M-Illandan joined
|
|||
mspo | so I guess it's all about your POV | 18:33 | |
18:33
Matthew[m] joined
|
|||
DrForr | mspo: I'm maintaining a WP blog at work, I can completely understand why. | 18:40 | |
18:41
LeCamarade joined
18:44
infina is now known as infina_
18:45
infina_ is now known as infina
18:48
mohae_ joined
18:50
nadim joined
18:51
mohae left,
mcmillhj left
18:54
mcmillhj joined
|
|||
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:54 | |
18:54
prammer left
18:55
prammer joined,
itaipu joined
|
|||
jsimonet | I tested it with "Rakudo version 2016.08.1-196-g2c95f74 built on MoarVM version 2016.08-47-g2eedba8" | 18:56 | |
18:58
yqt left
|
|||
moritz | jsimonet: this is indeed a bug in rakudo | 19:01 | |
jsimonet: will fix within the next 20min | |||
jsimonet | From what I know, it is located somewhere in src/core/Rakudo/Internals:1212 ? | 19:03 | |
moritz | jsimonet: src/core/IO/Path.pm | 19:04 | |
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 | |||
so if my setting compiles fine, I'm confident that adding that prefix will fix it | 19:05 | ||
19:06
labster joined
|
|||
moritz | fix pushed. | 19:06 | |
19:06
khw left
19:07
prammer left
|
|||
mspo | DrForr: yeah it sucks | 19:08 | |
bioduds | hey all, im checking this to understand the constructors but not getting it. docs.perl6.org/language/classtut#Constructors | ||
someone has more links to perl6 constructors examples? | |||
pretty please | |||
DrForr | Plenty on rosettacode :) | 19:09 | |
mspo | popular + sucks = $$$ | ||
19:09
mcmillhj left
|
|||
perlpilot | bioduds: what don't you get ? | 19:09 | |
bioduds | actually, I don't understand the callback and the array | ||
are they necessary? what do they do exactly? | |||
timotimo | they are just part of the example | 19:10 | |
they are the attributes of the class that gets consrtucted | |||
moritz | there's also docs.perl6.org/language/objects#Ob...nstruction | ||
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 | ||
thanks moritz | |||
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. | ||
nine | niner.name/talks/Perl%205%20and%20P...les/Dancr/ | ||
moritz | bioduds: when you're looking for examples, cloning 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
FROGGS left
|
|||
bioduds | okey :) | 19:13 | |
tx | |||
19:17
mcmillhj joined
19:19
yqt joined
19:26
AlexDaniel joined
|
|||
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» | ||
bartolin | I don't understand that test. could it be that it's bogus because ~~ has a tighter precedence than the comma? | ||
m: say so 1 ~~ **,1,** | 19:39 | ||
camelia | rakudo-moar 466770: OUTPUT«True1**» | ||
jnthn | m: dd (1 ~~ **,1,**) | 19:41 | |
camelia | rakudo-moar 466770: OUTPUT«(sub (*@_) { #`(Sub|54615136) ... }, 1, **)» | ||
jnthn | Looks like. | ||
It's passing a List to OK, and since the List is non-empty it'll pass | |||
So yeah, looks bogus | |||
bartolin | github.com/perl6/roast/blob/master...rray.t#L67 | ||
there are two of those tests ... | 19:42 | ||
perlpilot | m: use Test; ok (1,2,5), "looks good to me!"; # ;-) | ||
camelia | rakudo-moar 466770: OUTPUT«ok 1 - looks good to me!» | ||
bartolin | *g* | ||
jnthn | Seems legit :P | ||
m: say 1 ~~ (**,1,**) | |||
camelia | rakudo-moar 466770: OUTPUT«False» | ||
jnthn | m: say 1 ~~ (1,**) | 19:43 | |
camelia | rakudo-moar 466770: OUTPUT«False» | ||
jnthn | m: say (1,2) ~~ (1,**) | ||
camelia | rakudo-moar 466770: OUTPUT«True» | ||
jnthn | m: say (1,) ~~ (**,1,**) | ||
camelia | rakudo-moar 466770: OUTPUT«True» | ||
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,**) | ||
bartolin is to slow | |||
jnthn | Well, the test's *comment* claims, at least. :P | ||
It's also misleading 'cus it says "Array RHS" but the RHS there is actually a List... | |||
konobi | any linguists about at all? | 19:45 | |
19:46
spebern joined
|
|||
perlpilot | konobi: one might say we're all linguists since we study these strange, foreign languages called "programming languages" | 19:46 | |
19:47
cog_ joined
|
|||
bartolin | so, those bogus tests could be removed from roast? and, perhaps more important, should '1 ~~ (**,1,**)' actually return True? | 19:48 | |
19:50
cognominal left
19:51
labster left
19:52
Ven_ joined
|
|||
skids | bartolin: there are a few hoops to jump through WRT removing roast tests, since the tests are the language definition/contract. | 19:52 | |
(adding tests is less cumbersome) | |||
I don't know if anyone wrote that up as an administrative procedure yet. | 19:53 | ||
19:54
andre joined
19:55
andre is now known as Guest36521,
Guest36521 left
|
|||
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:55 | |
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
ufobat left
|
|||
jnthn | If the latter is going to work, the former would too... ** means "any number of elements" | 19:56 | |
bartolin | jnthn: I see, thanks for looking and explaining! (skids++ and perlpilot++, too) | 19:58 | |
20:01
espadrine joined
|
|||
AlexDaniel | TIL perlfoundation.org does not support unicode in comments. Second half of my comment was cut off because of emoji | 20:06 | |
arnsholt | konobi: You called? =) | 20:07 | |
konobi | ah, larry got back to me =0) | 20:08 | |
20:08
spebern left
|
|||
b2gills | m: say {[R[&(1/*+*)]](@_).nude}(3,7,15,1,292,1) # codegolf.stackexchange.com/a/93385/1147 | 20:09 | |
camelia | rakudo-moar 466770: OUTPUT«(104348 33215)» | ||
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 | |
20:10
spebern joined
|
|||
konobi | arnsholt: turns out that it's more semiotics that I'm after | 20:11 | |
arnsholt | Ah. I'm decidedly less useful for that, I'm afraid =) | 20:12 | |
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:14 | |
20:15
TEttinger joined
|
|||
konobi | tailgate: the mop | 20:16 | |
tailgate | the mop? | ||
konobi | docs.perl6.org/language/mop | ||
spebern | tailgate: say $obj.^methods; | ||
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…» | ||
tailgate | can you do the same thing for members? | ||
perlpilot | m: class C { has $!a; }; say C.^attributes; | 20:19 | |
camelia | rakudo-moar 466770: OUTPUT«(Mu $!a)» | ||
spebern | tailgate: say $obj.^attributes; | ||
tailgate | thanks | ||
El_Che | DrForr: the first review on your talk on safari has arrived :) | 20:20 | |
DrForr | Hooboy. | ||
20:21
lizmat left
20:22
Ven__ joined,
Ven_ left,
labster joined
20:23
cdg joined,
cdg left
20:24
cdg joined
20:31
kaare__ left
20:34
optikalmouse joined
|
|||
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 | |
spurt 'cool.json', to-json(my-obj); | |||
are the brackets around my-obj necessary? | 20:35 | ||
moritz | no | ||
they'd only be necessary if there's another argument to spurt after the to-json call | 20:36 | ||
20:37
acrussell left
|
|||
optikalmouse | spurt 'cool.json', to-json my-obj; | 20:38 | |
nice :D | |||
20:43
newbie1 joined,
yqt left
|
|||
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:45 | |
20:48
wamba left
20:53
newbie1 left,
newbie1 joined
20:54
zakharyas left,
mcmillhj left
20:56
skids left,
xq joined,
xq left
20:57
ab6tract joined
21:00
mcmillhj joined
|
|||
ab6tract | perl6 -MHTTP::UserAgent -e 'say HTTP::UserAgent.new.get("google.com")' # Failed to resolve host name | 21:02 | |
google.com is accessible via ping/curl/browser/etc | |||
21:04
mcmillhj left
|
|||
ab6tract | and LWP::Simple doesn't seem to survive when run many times in parallel ('could not parse headers') | 21:05 | |
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 | ||
s/best/only/ | |||
21:08
mcmillhj joined,
Ven__ left
|
|||
timotimo | we're using libuv's dns resolving stuff, i think? | 21:09 | |
maybe that has some problem with something | 21:11 | ||
21:12
mcmillhj left
21:13
geraud joined
|
|||
ugexe | there were problems resolving IPv6 i think | 21:14 | |
additionally I think google.com forwards to https, so you need IO::Socket::SSL installed to properly hit it | 21:15 | ||
ab6tract | ugexe: I thought that might be the case, still seeing the same issue | 21:16 | |
21:17
mcmillhj joined
|
|||
ab6tract | i have now tried adding Net::Curl::Easy to the mix | 21:17 | |
it is also unhappy | |||
21:19
BrassLantern joined
|
|||
ugexe | what about this | 21:20 | |
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
labster left
|
|||
ugexe | re: IPv6 rt.perl.org/Public/Bug/Display.html?id=123282 | 21:22 | |
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 | |
in language | |||
21:23
mcmillhj left
21:25
stmuk joined
|
|||
Xliff | Does nqp::index work with Buf? | 21:26 | |
21:27
stmuk_ left
|
|||
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» | ||
ab6tract | ugexe: HTTP::UserAgent fails regardless of what url i give it, IDK | 21:30 | |
ugexe: gist.github.com/ab5tract/ce9b7045d...3d2688b479 | 21:31 | ||
21:32
pmurias left
|
|||
ugexe | ab6tract: you'd need to test a site without IPv6 assuming you can hit an IPv4 address fine | 21:32 | |
21:33
optikalmouse left
|
|||
ab6tract | ugexe: like i said, I am not strictly testing google.com | 21:34 | |
sorry for the bad example | |||
huh... | |||
ugexe | lots of site have ipv6 support | ||
21:34
itaipu left,
labster joined
21:35
itaipu joined
|
|||
ab6tract | ugexe: first, i don't think there should be any such barriers to using one of our native libraries | 21:35 | |
if curl can hit the url, http-useragent should be able to as well | |||
ugexe | right, thats why there is a ticket filed above | ||
ab6tract | second, you were right, i had been using the google case too frequently | 21:36 | |
http-useragent does find my site at fys.wtf | 21:37 | ||
but it will still not do the full 1000 requests | |||
that code i have just shared should make it easy to test for yourself | |||
ugexe | I'm familiar with most of this from writing net::http | ||
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
|
|||
ugexe | sure. zef shells out for all its fetching adapters | 21:39 | |
ab6tract | great | 21:40 | |
ugexe | originally it used the code that became net::http. obviously the shell approach worked better | ||
21:41
optikalmouse joined,
optikalmouse left
|
|||
ab6tract | ugexe: and now it seems that net::http doesn't enjoy attempts to load it | 21:42 | |
harmil_wk | Is there any reason that someone would write: return unless [and] test($w1, $w2), test($w2, $w3), test($w3, $w4); | 21:43 | |
It's the same number of characters as: return unless test($w1, $w2) and test($w2, $w3) and test($w3, $w4); | |||
21:43
cpage_ left
|
|||
harmil_wk | ab6tract: that's a wonderful turn of phrase... | 21:44 | |
timotimo | personally, i'd "all" that :P | ||
21:44
mcmillhj left
|
|||
timotimo | saves 2 characters | 21:44 | |
21:44
sQuEE` joined,
espadrine left
|
|||
harmil_wk | timotimo: all might have been problematic, I'm not sure. $w1, etc. are all junctions in this example. | 21:44 | |
It's from rosettacode.org/wiki/Amb#Perl_6 | 21:45 | ||
21:45
PotatoGim left,
rodarmor left
|
|||
timotimo | you can nest junctions | 21:45 | |
21:45
mrsolo left
21:46
hobbs left,
zacts left,
leego left,
TeamBlast left,
adrusi left,
xfix left,
roguelazer left,
buggable left,
Glitchy left,
NeuralAnomaly left,
huggable left,
riatre left,
hoelzro left,
jsimonet left,
domm left
21:47
sQuEE left,
chansen_ left,
ugexe left,
jkva left,
integral left,
xfix joined
21:48
riatre joined
|
|||
ab6tract | sorry ugexe, i was holding that module wrong. use/import is fine | 21:48 | |
21:48
hoelzro joined,
integral joined
|
|||
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 | c: 1d2e9a7 | ugexe++ | doc/Type/List.pod6: Clarify argless pick/roll behavior |
||
21:49
tadzik left
|
|||
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 | ||
it'll execute one kind before the other | |||
harmil_wk | "pick/roll" behavior? Was I just pickrolled? | ||
timotimo: oh, interesting. | 21:50 | ||
21:51
jkva joined,
hobbs joined,
hobbs left,
hobbs joined,
adrusi joined
21:52
roguelazer joined,
ab6tract left,
rodarmor joined,
TeamBlast joined
21:53
mcmillhj joined,
chansen_ joined
21:54
mrsolo joined,
PotatoGim joined
21:57
mcmillhj left,
travis-ci joined
|
|||
travis-ci | Doc build failed. Nick Logan 'Clarify argless pick/roll behavior' | 21:57 | |
travis-ci.org/perl6/doc/builds/160299240 github.com/perl6/doc/compare/417fb...2e9a7e67e1 | |||
21:57
travis-ci left
21:59
tadzik joined,
rindolf left
22:00
Glitchy joined,
jsimonet joined,
ugexe joined,
domm joined
22:02
lizmat joined
22:05
nadim left
22:07
rindolf joined
22:09
stundenull joined
22:13
woolfy joined,
mcmillhj joined
22:18
mcmillhj left
22:23
cog__ joined
22:24
mcmillhj joined
|
|||
dalek | c: f8c5be4 | MasterDuke17++ | doc/Type/Signature.pod6: Fix typo in Signature |
22:26 | |
22:26
cog_ left,
skids joined
22:27
firstdayonthejob left
22:28
spider-mario left
22:29
mcmillhj left
22:34
mohae joined
22:37
mohae_ left
22:38
bjz_ left
22:40
mcmillhj joined
|
|||
harmil_wk | I wrote up a RC entry for jumps at: rosettacode.org/wiki/Jump_anywhere#Perl_6 | 22:42 | |
If anyone has time to review... | |||
22:44
mcmillhj left
22:45
travis-ci joined
|
|||
travis-ci | Doc build passed. MasterDuke17 'Fix typo in Signature' | 22:45 | |
travis-ci.org/perl6/doc/builds/160307434 github.com/perl6/doc/compare/1d2e9...c5be4337a0 | |||
22:45
travis-ci left
22:53
SmokeMachine____ left
22:55
mcmillhj joined
22:57
bjz joined
|
|||
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:57 | |
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
|
|||
TimToady | the unwinding does not happen until after the CATCH block executes, in case we want to .resume | 22:58 | |
22:58
bjz left
|
|||
ugexe | timotimo: gist.github.com/ab5tract/ce9b7045d...3d2688b479 | 22:58 | |
TimToady | also, we have the entire dynamic scope of the error available to the handler | ||
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 | 22:59 | |
23:00
mcmillhj left
|
|||
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:00 | |
23:01
ab6tract joined
|
|||
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:03 | |
naturally no errors are thrown | 23:04 | ||
AlexDaniel | yeah, can confirm that curl is more reliable… | ||
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("fys.wtf").body.decode("utf8").comb("stupid") } }' | 23:05 | |
gist has been updated | 23:06 | ||
mostyl cosmetic though | |||
*mostly | 23:07 | ||
and with that typo, i'm going to sleep :) | |||
timotimo | mo style, mo problems | 23:09 | |
ugexe | for some reason http::useragent does not get a benefit from a `sleep 1` | ||
timotimo | sleep 1 will block a thread for one second to make it unavailable for receiving new work or doing stuff | ||
you could try building a scheduler with a lower max-threads for this and see if that helps any? | |||
or rather whether it has the same kind of effect | 23:10 | ||
23:10
cpage_ joined
|
|||
ab6tract will take a look at using perl 5 fetchers tomorroq | 23:11 | ||
gahh! ok: bed time :) | |||
ugexe | right, and it also could mean the server is less likely to cause some unexpected socket close | ||
23:12
ab6tract left
23:14
mcmillhj joined
|
|||
SmokeMachine____ | if someone get some time, could (please) comment/critic this module? github.com/FCO/Heap | 23:18 | |
23:19
mcmillhj left
23:20
newbie1 left
23:25
itaipu left,
khw joined
23:26
itaipu joined
23:31
mcmillhj joined,
BrassLantern left,
BrassLantern joined,
BrassLantern left,
BrassLantern joined
23:32
BrassLantern left,
BrassLantern joined
23:33
cdg left
23:34
BenGoldberg joined
23:35
BrassLantern left,
mcmillhj left,
BrassLantern joined,
BrassLantern left
|
|||
MasterDuke | SmokeMachine____: are you sure you want '==' for your eqv? | 23:41 | |
m: say <a ab> ~~ <aa b> | |||
camelia | rakudo-moar ad5336: OUTPUT«False» | ||
MasterDuke | m: say <a ab> == <aa b> | ||
camelia | rakudo-moar ad5336: OUTPUT«True» | ||
MasterDuke | m: say <a ab> == <a a b> | 23:42 | |
camelia | rakudo-moar ad5336: OUTPUT«False» | ||
23:42
mcmillhj joined
|
|||
MasterDuke | m: say <a ab> ~~ <a a b> | 23:42 | |
camelia | rakudo-moar ad5336: OUTPUT«False» | ||
MasterDuke | m: say <a ab> == <c d> | ||
camelia | rakudo-moar ad5336: OUTPUT«True» | ||
SmokeMachine____ | Yes, I do not want that... | ||
MasterDuke | i think == for lists just checks that they have the same number of elems | 23:43 | |
23:47
mcmillhj left
|
|||
BenGoldberg | Perl6's == operator is the same as perl5's: it just checks for numeric equality. | 23:48 | |
23:48
newbie1 joined
|
|||
BenGoldberg | m: say <a b> == 2; | 23:48 | |
camelia | rakudo-moar ad5336: OUTPUT«True» | ||
BenGoldberg | Also, note that == is not truly aware of lists, it only cares that it's arguments can be converted to Number. | 23:50 | |
m: say <a b>.Number; | |||
camelia | rakudo-moar ad5336: OUTPUT«Method 'Number' not found for invocant of class 'List' in block <unit> at <tmp> line 1» | ||
BenGoldberg | m: say <a b>.Int; | ||
camelia | rakudo-moar ad5336: OUTPUT«2» | ||
BenGoldberg | m: say Int.^roles | 23:51 | |
camelia | rakudo-moar ad5336: OUTPUT«((Real) (Numeric))» | ||
23:51
spebern left
|
|||
BenGoldberg | m: say <a b>.Numeric; | 23:51 | |
camelia | rakudo-moar ad5336: OUTPUT«2» | ||
BenGoldberg | Err, pretend I said, Numeric, not Number. | ||
23:54
RabidGravy left
23:55
rindolf left
23:56
ka joined
23:58
mcmillhj joined
|