[Tux] | This is Rakudo version 2016.10-9-g906719c built on MoarVM version 2016.10-5-g3f1ef57 | 06:45 | |
csv-ip5xs 3.161 | |||
test 15.977 | |||
test-t 7.386 | |||
csv-parser 17.999 | |||
FROGGS | jnthn: I got now something that works: gist.github.com/FROGGS/b49225ac2e4...4_tests-sh | 09:16 | |
jnthn: (needs lots of cleanup though) | |||
and the proper implementation like you said :o) | |||
dalek | kudo/nom: 20d37a1 | lizmat++ | src/core/Rakudo/Internals.pm: Introducing Rakudo::Internals.SeqSkipNFromIterator Create a Seq from an iterator skipping N generated values first |
10:29 | |
FROGGS | jnthn: I've hit a problem... for nativecall subs we build info hashes in NC.pm for params and return types so that moar knows what todo... | 11:14 | |
jnthn: now, we dont touch attributes, so we dont have these hashes for attributes which have a signature | |||
I mean, I can do the same hack like what I did with HAS, but I'd like to not do that... | 11:30 | ||
nine | github.com/tadzik/panda/issues/331 is a stereotypical "I shot this guy, how can I fix him? I don't want to bring him to the hospital." | 11:44 | |
tadzik | hah | 11:51 | |
jnthn | FROGGS: At what point is the signature needed? | 12:11 | |
FROGGS | after instanciating the class I guess... not before | 12:13 | |
jnthn: or when accessing the attribute, but I dunno how we could intercept that | 12:16 | ||
jnthn | What should the attribute contain? | 12:18 | |
I guess some kind of Code that when invoked will make the call? | |||
If so...maybe we can give NativeCall an "example" object when configuring the CStruct | 12:19 | ||
Plus an attribute pointing to a native callsite | |||
And it can clone + set that attr | |||
(clone the object that is) | |||
So it happens as part of the marshalling of the struct back from C-land | |||
Would that help? | |||
FROGGS | I guess... but how would we configure the CStruct in NativeCall.pm? | 12:20 | |
jnthn | Hmmm | ||
Yeah, I guess there's a slight timing issue there | 12:21 | ||
Or something like. | 12:22 | ||
FROGGS | aye | ||
jnthn | In that the CStruct REPR is decoupled from nativecall itself | 12:23 | |
FROGGS | m: multi sub trait_mod:<is>(Mu $a, :$repr = 'CStruct') { say 42 }; class Foo is repr<CStruct> { has int8 $.a } # :o( | 12:29 | |
camelia | ( no output ) | ||
FROGGS | m: multi sub trait_mod:<is>(Mu $a, :$repr!) { say 42 }; class Foo is repr<CStruct> { has int8 $.a } | 12:30 | |
camelia | ( no output ) | ||
FROGGS | uhh | 12:31 | |
method trait_mod:sym<is>($/) { | |||
# Handle is repr specially. | |||
if ~$<longname> eq 'repr' { | |||
(it sets $*REPR in the actions fwiw) | 12:32 | ||
jnthn | Right | 12:35 | |
That has to be a special form | |||
FROGGS | but cant the trait just set $*REPR? | 12:36 | |
jnthn | ...don't do that :P | ||
FROGGS | damn | ||
*g* | |||
jnthn | It'll be fragile in ways we'll regret later | ||
But | |||
In the attribute composition | |||
You can detect the target package has repr CStruct | 12:37 | ||
And do something differently there | |||
(nqp::reprname) | |||
FROGGS | yes, but all of what I'd liked to do is in NativeCall.pm | 12:38 | |
and I dont think we want to move that stuff | |||
or do think of something else? | 12:39 | ||
jnthn | Well, we could have NativeCall install a hook on load, for example using nqp::bindhllsym or so, and look for that if we see we have repr CStruct | 12:40 | |
FROGGS | ahhh | 12:41 | |
sure, the user would have loaded NativeCall at that time... | 12:42 | ||
jnthn | In combination with a Callable type | ||
Right | |||
FROGGS | š | ||
jnthn | And if they didn't we can complain "Can only use Callable attributes inside of a CStruct after loading a native calling module" | ||
FROGGS | yes... I love it! | 12:43 | |
jnthn | Then we don't couple it too tightly to the present NativeCall :) | ||
FROGGS | aye | ||
iBakeCake | Seems like NativeCall tests are failing on Windows: ci.appveyor.com/project/moritz/rak...p27ci1t03j Lots of "x"s on github.com/rakudo/rakudo/commits/nom | 13:44 | |
And based on cursory glance, they started from when FROGGS++ did "bump nqp/moar for num->bigint fix": github.com/rakudo/rakudo/commit/22...ca446a7ae2 | 13:45 | ||
[Coke] | m: "{".uniname.say | 13:49 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Unable to parse expression in double quotes; couldn't find final '"' ā¤at <tmp>:1ā¤------> "{".uniname.sayā<EOL>ā¤ expecting any of:ā¤ double quotesā¤ termā¤Ā» | ||
[Coke] | m: d'"{'.uniname.say | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Two terms in a rowā¤at <tmp>:1ā¤------> dā'"{'.uniname.sayā¤ expecting any of:ā¤ infixā¤ infix stopperā¤ statement endā¤ statement modifierā¤ statement ā¦Ā» | ||
[Coke] | m: '{'.uniname.say | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«LEFT CURLY BRACKETā¤Ā» | ||
[Coke] | our docs refer to braces, curleys, curlys ... | 13:50 | |
iBakeCake | curleys and curlys look like incorrect spelling of curlies :) | ||
[Coke] | crap, wrong window! :) | ||
iBakeCake | .oO( better than wrong door... ) |
13:51 | |
m: use Test; is-deeply sin(my num $ = 0e0), my num $ = 1e0; | 13:59 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«not ok 1 - ā¤ā¤# Failed test at <tmp> line 1ā¤# expected: 1e0ā¤# got: 0e0ā¤Ā» | ||
iBakeCake | m: use Test; is-deeply sin(my num $ = 0e0), my num $ = 0e0; | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«ok 1 - ā¤Ā» | ||
iBakeCake | Is this a safe test or should all floating point tests use is-approx()? | ||
m: say sin pi | 14:02 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«1.22464679914735e-16ā¤Ā» | ||
iBakeCake | m: say sin 2*pi | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«-2.44929359829471e-16ā¤Ā» | ||
FROGGS | iBakeCake: will look at it in a few hours | 14:03 | |
iBakeCake | FROGGS++ | 14:04 | |
tbrowder | timotimo: any relation to github:timo? | 14:06 | |
iBakeCake | tbrowder: yes | 14:08 | |
tbrowder | the same person? | ||
iBakeCake | Yes. | ||
tbrowder | thanks | ||
iBakeCake | m: say (sin Ļ/8) == Ā½*sqrt 2 | 14:11 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«Falseā¤Ā» | ||
iBakeCake | m: say (sin Ļ/8) ā Ā½*sqrt 2 | 14:12 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«Trueā¤Ā» | ||
tbrowder | .tell timotimo I was introduced to Jupyter at a Python group mtg and wonder if yr project iperl6kernel could use some help? or is there no longer any interest? | ||
yoleaux2 | tbrowder: I'll pass your message to timotimo. | ||
iBakeCake | I guess better use is-approx everywhere and not rely on 0 being speshul or anything | ||
pyrimidine | tbrowder: +1 on assisting w/ iperl6kernel with timotimo | 14:22 | |
tbrowder: I've used Jupyter for a bit now (on and off), having a working kernel would definitely help bring in the science-types (bio, chem, etc) | 14:23 | ||
arnsholt | tbrowder: If you wanna work in IPerl6, I think that'd be very cool! | 14:24 | |
pyrimidine | TBH I keep forgetting there is a IPerl6 :) | ||
arnsholt | I think I may be the last person to have touched the code | 14:25 | |
iBakeCake | m: say (0/0) <= 0 | 15:04 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«Trueā¤Ā» | ||
iBakeCake | m: say (0/0) => 0 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Attempt to divide by zero using divā¤ in block <unit> at <tmp> line 1ā¤ā¤Actually thrown at:ā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā» | ||
iBakeCake | m: say (0/0) <= 1e-5 | 15:05 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«Falseā¤Ā» | ||
iBakeCake | Oh, => is a pair :} | 15:07 | |
iBakeCake wishes we had fancy versions of these | 15:08 | ||
m: say (0/0) <= 0e0 | 15:10 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Falseā¤Ā» | ||
bartolin_ | .tell psch I (also) spend some time looking at those UnwindExceptions. didn't find a solution, but at least I think I understand why we get them with for loops and not with 'while' or 'loop' | 15:12 | |
yoleaux2 | bartolin_: I'll pass your message to psch. | ||
bartolin_ | .tell psch maybe this is of interest for you: gist.github.com/usev6/78beac8113b8...a66c3cd68f | ||
yoleaux2 | bartolin_: I'll pass your message to psch. | ||
bartolin_ | j: say gather while True { take 42; last } # works fine | ||
camelia | rakudo-jvm 2a1605: OUTPUTĀ«(42)ā¤Ā» | ||
iBakeCake | m: use nqp; my ($a, $b) = (0/0).Num, 1e0; say nqp::p6bool(nqp::isle_n(nqp::unbox_n($a), nqp::unbox_n($b))) | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Falseā¤Ā» | ||
iBakeCake | m: use Test; is-approx :rel-tol(1e0), 0, 0; | 15:13 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«not ok 1 - ā¤ā¤# Failed test at <tmp> line 1ā¤Attempt to divide by zero using divā¤ in sub is-approx-calculate at /home/camelia/rakudo-m-inst-1/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 301ā¤ in sub is-approx at /home/ā¦Ā» | ||
iBakeCake | m: use Test; is-approx :rel-tol(1), 0, 0; | ||
bartolin_ | j: say gather for ^3 { take 42; last } # UnwindException | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«ok 1 - ā¤Ā» | ||
rakudo-jvm 2a1605: OUTPUTĀ«Error in socket connection:org.perl6.nqp.runtime.UnwindExceptionā¤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)ā¤ at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)ā¤ at org.perl6.nqp.runtime.Gā¦Ā» | |||
iBakeCake | I don't get it, why one Num triggers the div-by-zero, but Int doesn't? | ||
Code's here: github.com/rakudo/rakudo/blob/nom/...t.pm6#L274 | |||
m: say 0/0 <= 1 | 15:17 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Trueā¤Ā» | ||
iBakeCake | m: say 0/0 <= 1e0 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Falseā¤Ā» | ||
iBakeCake | something with this | ||
I see. | 15:18 | ||
(the num version coerces Rat to Num | |||
) | |||
m: say (0/0).Bridge | 15:19 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«NaNā¤Ā» | ||
[Coke] | m: say '['.uniname | 15:29 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«LEFT SQUARE BRACKETā¤Ā» | ||
iBakeCake | m: dd [ 0/0 == 0, 0/0 < 0, 0/0 <= 0 ] | 15:32 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«[Bool::False, Bool::False, Bool::True]ā¤Ā» | ||
iBakeCake claims that to be a bug | |||
dalek | ast: d5a9ebb | usev6++ | S32-list/head.t: Unfudge test for rakudo-j ... lizmat++ added a bandaid with rakudo commit 666128fc6e |
15:34 | |
tbrowder | ref iperl6: can someone cobble together a rudimentary getting started guide or todoroadmap list to help a noob? | ||
s/todoroadmap/todo list or roadmap/ | 15:35 | ||
(whatever...) | 15:36 | ||
sivoais | timotimo tbrowder arnsholt pyrimidine : hey all, as the author of IPerl (for Perl 5), I can help out with anything you all need | 15:49 | |
link is <github.com/EntropyOrg/p5-Devel-IPerl> | |||
iBakeCake | \o/ | ||
tbrowder | sivoais: and very cool Iperl5 is--looked at it last night after i saw Jupyter for the first time--looks like a great tool for Perl [56] teaching, marketing, and evangelism | 15:52 | |
pyrimidine | sivoais++ | 15:53 | |
iBakeCake | m: multi foo (1/3) {} | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Unable to parse regex; couldn't find final '/'ā¤at <tmp>:1ā¤------> multi foo (1/3ā) {}ā¤ expecting any of:ā¤ infix stopperā¤Ā» | ||
iBakeCake | aww :( | ||
sivoais | speaking of the last bit, I'm working on that :-) I'm writing some lesson plans for Perl and that's why I made this EntropyOrg GitHub organisation. I want to have a central place where people can learn how to apply Perl to science problems | 15:55 | |
I've put together a quick site at <entropyorg.github.io/>. Planning on hosting some Jupyter notebooks on there. | 15:56 | ||
iBakeCake | Rakudobugged: rt.perl.org/Ticket/Display.html?id=129911 | 15:59 | |
dalek | kudo/nom: f7770ed | (Zoffix Znet)++ | / (2 files): Fix edge case in is-approx that triggers DivByZero exception If both $got and $expected are zero, their absolute max is also zero, so we end up dividing by zero to calculate relative difference. This was actually silent due to 0/0 <= Int returning True, however other Numerics give False, triggering test failure, and the explosion when attempting to print the resultant relative difference to user. |
16:01 | |
iBakeCake | m: say (0/0) == (0/0) | 16:06 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«Trueā¤Ā» | ||
iBakeCake | m: say (0/0).Num == (0/0).Num | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Falseā¤Ā» | ||
iBakeCake | m: say (0/0).Int == (0/0).Int | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Attempt to divide by zero using divā¤ in block <unit> at <tmp> line 1ā¤ā¤Actually thrown at:ā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā» | ||
iBakeCake | Pretty nuts, but at least it makes perfect sense :) | ||
geekosaur | m: (0/0).WHAT.say | 16:07 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«(Rat)ā¤Ā» | ||
geekosaur | yeh. I guess that covers it... | ||
iBakeCake | m: say 100/0 == 42/0 | 16:09 | |
camelia | rakudo-moar 20d37a: OUTPUTĀ«Trueā¤Ā» | ||
iBakeCake | This makes lesser sense... | ||
geekosaur | aren't they both infinity? | 16:10 | |
iBakeCake | m: say -100/0 == 42/0 | ||
camelia | rakudo-moar 20d37a: OUTPUTĀ«Trueā¤Ā» | ||
iBakeCake | Fine, how about this one? :) | ||
(by IEEE that'd be -Inf == Inf) | |||
geekosaur | except this is Rat, not Num | 16:11 | |
iBakeCake | Exactly, so I'd expect it to compare more sanely | ||
And our Nums give NaN for 0/0 | |||
m: dd (0/0).Num | |||
camelia | rakudo-moar f7770e: OUTPUTĀ«NaNā¤Ā» | ||
iBakeCake | m: dd (my num $ = 0) / (my num $ = 0) | 16:12 | |
camelia | rakudo-moar f7770e: OUTPUTĀ«This type cannot unbox to a native number: P6opaque, Intā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā» | ||
iBakeCake | m: dd (my num $ = 0e0) / (my num $ = 0e0) | ||
camelia | rakudo-moar f7770e: OUTPUTĀ«This type cannot unbox to a native number: P6opaque, Failureā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā» | ||
geekosaur | which, arguably Rat is not handling signs ideally there, but I'm not sure how you handle it --- think it's one of those cases where different use cases expect different behavior | ||
iBakeCake decides not to go down that rabbit hole and continues covering nummy trig :) | 16:14 | ||
m: say tan(Ļ/2) == Inf | 16:30 | ||
camelia | rakudo-moar f7770e: OUTPUTĀ«Falseā¤Ā» | ||
iBakeCake | Booo! Bug :} | ||
moritz | m: say tan(Ļ/2) | 16:33 | |
camelia | rakudo-moar f7770e: OUTPUTĀ«1.63312393531954e+16ā¤Ā» | ||
[Coke] | m: use Test; is-approx( tan(/2), Inf); | 16:35 | |
camelia | rakudo-moar f7770e: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Unable to parse regex; couldn't find final '/'ā¤at <tmp>:1ā¤------> use Test; is-approx( tan(/2ā), Inf);ā¤ expecting any of:ā¤ argument listā¤ infix stopperā¤ termā¤Ā» | ||
[Coke] | m: use Test; is-approx( tan(/2), Inf); | ||
camelia | rakudo-moar f7770e: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Unable to parse regex; couldn't find final '/'ā¤at <tmp>:1ā¤------> use Test; is-approx( tan(/2ā), Inf);ā¤ expecting any of:ā¤ argument listā¤ infix stopperā¤ termā¤Ā» | ||
[Coke] | arglebargle. | ||
iBakeCake | m: use Test; is-approx( tan(Ļ/2), Inf); | ||
camelia | rakudo-moar f7770e: OUTPUTĀ«not ok 1 - ā¤ā¤# Failed test at <tmp> line 1ā¤# maximum absolute tolerance: 1e-05ā¤# actual absolute difference: Infā¤Ā» | ||
[Coke] | (the answer is no, btw.) | ||
iBakeCake | The answer is yes, and I can prove it! :) | 16:36 | |
m: say Ļ/2 == atan ā | |||
camelia | rakudo-moar f7770e: OUTPUTĀ«Trueā¤Ā» | ||
iBakeCake | boom :P | ||
^_^ | |||
geekosaur | m: say (Ļ/2).WHAT | 16:37 | |
camelia | rakudo-moar f7770e: OUTPUTĀ«(Num)ā¤Ā» | ||
geekosaur | ok, so at least it's not that silliness... | ||
iBakeCake | :) | ||
FROGGS | Failed to create directory 'C:\rakudo\lib\.precomp\65678D71BDBB5D2550E231A8B22B6669961F1184.1476807230.24051' with mode '0o777': Failed to mkdir: 2 | 16:38 | |
:o( | |||
iBakeCake | No, it's 'cause our Ļ/2 is not exact Ļ/2 in mathematical sense so it's not exactly at tan's assymptote :) | ||
FROGGS | it creates the dir and then explodes... I guess it tries to create it twice | ||
jnthn | FROGGS: If you re-run it then mysteriously works :/ | 16:40 | |
FROGGS: That's been driving me nuts the last couple of days, been doing a little module development on Windows | |||
FROGGS | jnthn: yes, have to run it several times though | ||
jnthn | FROGGS: Yes, but for me at least it is a different directory each time... | ||
FROGGS | gist.github.com/FROGGS/215ca7354be...16159c44fd | ||
jnthn | And eventually works | ||
FROGGS | nine: do you have a clue offhand? | 16:41 | |
jnthn | I was considering using some of my Perl 6 tuits tomorrow to look into it, but feel free to beat me to it... | ||
FROGGS | sure | ||
might be about the stat buffer? we'll see... | 16:44 | ||
geekosaur | welp, was trying to look but my line numbers differ and the local notwork is sufficiently not that updating git is hanging :/ | 16:47 | |
FROGGS | C:\rakudo>perl6 -e "my $foo = 'foo'.IO; say $foo.e; say $foo.mkdir" | ||
False | |||
Failed to create directory 'C:\rakudo\foo' with mode '0o777': Failed to mkdir: 2 | |||
it acts as like success<=>failure are inverted for nqp::mkdir | 16:50 | ||
wow | 16:52 | ||
mkdir "foo" returns true if "foo" is a file | |||
:S | |||
ugexe | from nqp, or from its existence being cached by $foo.e? | 16:53 | |
iBakeCake | m: subset InfTan of Num where * % (Ļ/2) ā 0; multi tan (InfTan) { ā }; dd [ tan(Ļ), tan(Ļ/2), tan(2) ] | 16:54 | |
camelia | rakudo-moar f7770e: OUTPUTĀ«Cannot invoke this object (REPR: Null; VMNull)ā¤ in whatevercode at <tmp> line 1ā¤ in any accepts_type at gen/moar/m-Metamodel.nqp line 3472ā¤ in sub tan at <tmp> line 1ā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā» | ||
FROGGS | ugexe: moar | ||
ugexe: moar does a stat after calling mkdir | |||
ugexe: see github.com/MoarVM/MoarVM/blob/mast...rops.c#L46 | 16:56 | ||
jnthn: if "last couple of days" is like 9, then I might know why :o) | 17:01 | ||
geekosaur just spotted the cause of that true-on-file... | 17:02 | ||
FROGGS | yeah, it is JimmyZ's patch that is intended to not change meaning | ||
geekosaur: yeah | |||
brb | 17:03 | ||
geekosaur | (you will get EEXIST in mkdir_p if a component mkdir fails because it's a file, but MVM_dir_mkdir thinks all EEXIST mean the dir existed beforehand | ||
iBakeCake | Rakudobugged: rt.perl.org/Ticket/Display.html?id=129912 | ||
geekosaur | in fact, since the errno we're seeing is EEXIST, this is probably both bugs :) | 17:07 | |
iBakeCake | m: use Test; is-approx :rel-tol(1e-15), sin(Ļ), 0 | 17:24 | |
camelia | rakudo-moar f7770e: OUTPUTĀ«not ok 1 - ā¤ā¤# Failed test at <tmp> line 1ā¤# maximum relative tolerance: 1e-15ā¤# actual relative difference: 1ā¤Ā» | ||
iBakeCake | commitable: 2016.10 use Test; is-approx :rel-tol(1e-15), sin(Ļ), 0 | ||
committable6 | iBakeCake, Ā¦Ā«2016.10Ā»: not ok 1 - ā¤ā¤# Failed test at /tmp/ALIDT91faL line 1ā¤# maximum relative tolerance: 1e-15ā¤# actual relative difference: 1 Ā«exit code = 1Ā» | ||
iBakeCake | Well, damn. | ||
My is-approx version totally sucks in real-world usage :( | 17:25 | ||
At least now I know what all that trickery about using abs-tol closer to zero was all about :'( | 17:26 | ||
Point to learn: pay more attention to real world usage, not how n00b-friendly your interface is | 17:29 | ||
How terrible would it be to amend the no-arg behaviour of is-approx? 'cause I know roast will still pass, but that's largely due to there being no tests for it in roast. | 17:35 | ||
nine | FROGGS: I'm glad you've already found it because I'd have had no idea :) | 17:36 | |
iBakeCake | Basically, while the original idea that default abs-tol of 1e-5 is easy to understand worked great... Unfortunatelly, in real world usage that default is kinda useless. I keep running into cases where that value is too high or too low, so I keep having to explicitly specify :rel-tol, but then if you do that, you run into cases where you have to switch to abs-tol if you're testing in proximity to zero. So | 17:37 | |
the old is_approx handled that actually well; I was just too stupid to see it. | |||
So I want to plug the old is_approx behaviour when no tolerances are specified. Giving us both the DWIMMI version and fully configurable version | 17:38 | ||
geekosaur saw the commit was reverted... proper fix for that would have been to see not-a-dir and immediately return -1/ENOTDIR, so -1/EEXIST specifically means valid dir already existed. although unsure whether that would also fix the Windows misbehavior. | 17:41 | ||
FROGGS | geekosaur: we can fix it in a branch... just wanted to unbust windows build quickly | 17:43 | |
geekosaur | sure. | ||
[Coke] | is that a post-release commit? | 17:47 | |
dalek | ast: 441508d | usev6++ | S02-types/num.t: Fudge failing test for infix<**>(num, num) on JVM |
||
p: b270833 | FROGGS++ | tools/build/MOAR_REVISION: bump moar to unbust windows |
17:48 | ||
kudo/nom: 208a4c2 | FROGGS++ | tools/build/NQP_REVISION: bump nqp/moar to unbust windows |
17:49 | ||
FROGGS | [Coke]: was pre release | ||
iBakeCake | FROGGS: is Windows sufficiently busted that R* release is best not based on it? | ||
on the build with that commit in | 17:50 | ||
FROGGS | well, one could patch it manually... or we'd do a point release | ||
both would work | |||
geekosaur | since installing packages requires multiple attempts, I'd say yes it is too broken | ||
iBakeCake | stmuk: ^^^ what are we doing? Are you going to patch manually? From what I understand the issue is down in MoarVM. If you need me to do a point-release, let me know | 17:51 | |
FROGGS | .tell stmuk have a look at github.com/MoarVM/MoarVM/commit/0402247933 | 17:52 | |
yoleaux2 | FROGGS: I'll pass your message to stmuk. | ||
FROGGS | iBakeCake: btw, the nativecall test fails are also gone on windows: ci.appveyor.com/project/moritz/rak...xthhffbg2v | 18:00 | |
iBakeCake: perhaps related... dunno | |||
iBakeCake | cool | 18:01 | |
moritz | note that the appveyor tests have been flapping for quite some time | 18:04 | |
iBakeCake | j: my num $n1 = 1e0; my num $nu; dd $n1 ** $nu | 18:05 | |
camelia | rakudo-jvm 2a1605: OUTPUTĀ«NaNā¤Ā» | ||
iBakeCake | m: use NativeCall; sub pow(num64, num64-->num64) is native {}; dd pow 1e0, NaN | 18:09 | |
camelia | rakudo-moar f7770e: OUTPUTĀ«1e0ā¤Ā» | ||
iBakeCake | I wonder if that's a backend difference that should be acceptable? 'cause we're basically using native VM ops and JVM's uses the version of pow() that gives a NaN for 1**NaN | 18:12 | |
[Coke] | I'd like to think that rakudo has one right answer there, and we have to work around the vms that disagree, but that may be unreasonable. | 18:18 | |
iBakeCake | j: multi infix:<**> (num, NaN) { 1e0 }; my num $n1 = 1e0; my num $nu; dd $n1 ** $nu | ||
camelia | rakudo-jvm 2a1605: OUTPUTĀ«NaNā¤Ā» | ||
iBakeCake | I guess that can be one way | ||
well.. if it atually worked :D | 18:19 | ||
bartolin_ | I'm not sure how to handle that. for the records a link to the java docs where it says 'if the second argument is NaN, then the result is NaN' docs.oracle.com/javase/8/docs/api/...le-double- | 18:26 | |
iBakeCake | bartolin_: yeah, and that's correct :) Both versions are correct | 18:28 | |
bartolin_ | yeah. I tend to think those differences should be okay. | 18:29 | |
dalek | kudo/nom: 82432a4 | (Zoffix Znet)++ | lib/Test.pm6: Make is-approx DWIM when no tolerances are provided When current version was designed, the default was chosen to abs-tol of 1-e5, with reasoning behind that it would be easy for users to understand it (as compared with rel-tol or some DWIM mechanism). While that goal was accomplished, when using the function in real-world application, the abs-tol default proves to be nearly useless. It's too small for large numbers and too large for small numbers, forcing the user to specify manually. Moreover, rel-tol can't be used when $expected is zero, so the user constantly has to think about which tolerances to plug into the function. This commit restores the DWIMmy behaviour of old is_approx for the default case where no tolerances are given: if $expected.abs() is smaller than 1e-6, use absolute tolerance of 1e-5; else, use relative tolerance of 1e-6. b4fe680 | (Zoffix Znet)++ | lib/Test.pm6: Make is-approx include actual received values in failure output Sample, when both tolerances are set: ānot ok 1 - ā ā# Failed test at -e line 1 ā# expected approximately: -0.785398163397448 ā# got: 2.35619449019234 ā# maximum absolute tolerance: 1e-100 ā# actual absolute difference: 3.14159265358979 ā# maximum relative tolerance: 0.1 43dbc96 | (Zoffix Znet)++ | lib/Test.pm6: Make _diag propagate indents to each line of diag message Fixes staggered indents with multi-line failure messages/user-triggered diag() messages that are output while running inside a subtest() |
18:40 | |
iBakeCake | github.com/rakudo/rakudo/commit/82...444d9991d5 | ||
Zoffix-- | 18:46 | ||
ZOFVM: Files=1198, Tests=130033, 129 wallclock secs (21.45 usr 3.11 sys + 2387.52 cusr 190.78 csys = 2602.86 CPU) | 19:31 | ||
iBakeCake | dalek: you're doing a very poor job with this commit business... I may just replace you! | ||
bartolin_ | *g* Zoffix++ | 19:35 | |
iBakeCake Zoffix temp.perl6.party/trig-tests.txt | 19:46 | ||
oops | |||
Good thing it wasn't top secret information I tried to message :} | |||
iBakeCake & | |||
jdv79 | Could we do a pay per bug kind of thing? | 20:17 | |
timotimo | you're looking for that gnarly concurrency bug to be hunted down and slain? | 20:18 | |
yoleaux2 | 14:12Z <tbrowder> timotimo: I was introduced to Jupyter at a Python group mtg and wonder if yr project iperl6kernel could use some help? or is there no longer any interest? | ||
jdv79 | not that it matters much in the large but I've stopped playing with perl6 because of a couple async bugs blocking a personal project. | ||
timotimo | tbrowder: all the help is needed | 20:19 | |
tbrowder | timotimo: would it help to study p5 version or are you starting from scratch? | 20:21 | |
timotimo | i'm not actually investing any time in that project, haven't in a year or two | 20:22 | |
[Coke] | jdv79: what's your RT again? | ||
timotimo | the current stuff in there is arnsholt's work, iirc | ||
feel free to go to extreme measures to tackle this project: Inline::Perl5, Inline::Python, whatever ;) | |||
[Coke] | timotimo: Inline::Tcl or bust. | ||
timotimo | heh. | 20:23 | |
[Coke] | I picked bust, btw. | 20:24 | |
timotimo | i see | ||
sivoais | timotimo, tbrowder: would you be open to using a similar API to the P5 version that I wrote? Or even collaborating under the EntropyOrg GitHub repo? | 20:25 | |
I'm asking because that way we can share the load of marketing and documentation. | |||
timotimo | what does that API add on top of the ipython api? | 20:26 | |
er, i mean jupyter api | |||
sivoais | The Jupyter API only gives the messaging spec. What I did is create a set of Perl-side interfaces that any objects can use to advertise that they can be displayed in the browser. | 20:27 | |
"multimedia capabilities" | |||
I'll link an example | |||
essentially, any object that can be displayed implements this method <github.com/EntropyOrg/p5-Devel-IPe...ble.pm> | 20:28 | ||
that returns a hash of MIME types to representations | 20:29 | ||
I then have specific versions of that for different file formats such as PNG or SVG | 20:30 | ||
e.g., <github.com/EntropyOrg/p5-Devel-IPe...SVG.pm> | |||
timotimo | what's the value of the representations hash? | 20:33 | |
sivoais | I have also done the work of converting Jupyter Notebooks to POD so that they can be used as CPAN documentation. :-) Very useful for image processing libraries. | ||
timotimo | cool | ||
sorry, not "the value of the hash", "the values in the hash" | 20:34 | ||
sivoais | The values are byte-strings. They are used to respond to the frontend with the display_data message type <jupyter-client.readthedocs.io/en/la...ml#id4> | 20:37 | |
You can send multiple representations so that the frontend can choose which one is appropriate for its interface. | |||
so for a PNG, it's { "image/png" => (raw bytes of PNG), "text/html" => '<img src="data:..."/>' } | 20:39 | ||
So an example of where this interface would be useful is if I made a PDL subclass that indicated that the contents are RGB images. That way I can automatically display the contents after doing a calculation. | 20:41 | ||
Another example of it in action <nbviewer.jupyter.org/github/zmughal....ipynb> | 20:43 | ||
dalek | kudo/nom: eb6907e | (Zoffix Znet)++ | lib/Test.pm6: Consider current $indent when blanking empty _diag() lines |
21:01 | |
timotimo | sivoais: i was wondering if maybe it could be "lazy", i.e. the backend and frontend would decide on one type and the backend would generate the bytestring for that, then | 21:14 | |
sivoais | timotimo: I was thinking about that as well, but we're working with a message spec that is a little limited by the capabilities of the frontend. It doesn't have any content negotiation yet. | 21:18 | |
timotimo | right | ||
sivoais | We'd have to create a proposal (JEP) in order to get something like that. Another reason why they haven't gone in that direction is that all the representations are stored in the notebook format so that post-processors can make use of it. | 21:21 | |
For example, if you wanted to turn a notebook into a PDF via LaTeX. | |||
pyrimidine | It's funny, I don't recall whether you can easily jump back and forth from various languages with Jupyter (I think so, but not sure) | 21:32 | |
for instance, I use perl (5 and 6), python, R. It's quite conceivable I would use a mix of all of those in one bioinformatics project depending on the tools I am using | 21:34 | ||
sivoais | pyrimidine: you can switch kernels in Jupyter Notebook, but the last I tried, a language applies to the entire notebook when you are trying to use syntax highlighting. It's not really well thought out for that use case. | ||
But Beaker Notebook uses the same backend and has some support for that idea | 21:35 | ||
pyrimidine | May have to look at Beaker. We're running into this more and more | ||
sivoais | I have not yet tried it, but that requires some more work to get right. afaict, it doesn't handle complex data types... so transferring a PDL or an R data.frame or a NumPy nd-array isn't exactly going to happen | 21:36 | |
your best bet might be storing in HDF? :-/ | 21:37 | ||
pyrimidine | or we could use Perl 6 and just use Inline::Perl5/Python. Now just need to get Inline::R :) | 21:38 | |
timotimo | inline r is probably easy ish | 21:40 | |
pyrimidine | timotimo: well-volunteered! | 21:41 | |
looking at beaker, it appears they support some autotranslation between languages (example is processing data w/ python, model in R, viz in JS). | 21:43 | ||
however, it appears that perl is not one of their supported languages :/ | |||
sivoais | pyrimidine: I have the R interface in P5 <github.com/EntropyOrg/p5-Statistics-NiceR> | 21:50 | |
You can see that I'm building out an entire science ecosystem ;-) | 21:51 | ||
pyrimidine | sivoais: nice! | 21:52 | |
Zoffix | jdv79, it would help your bug, if you could reproduce it with something smaller than an entire XML module :} | 22:00 | |
[Coke], it's rt.perl.org/Ticket/Display.html?id=128833 | |||
dalek | ast: e692da7 | (Zoffix Znet)++ | S02-types/num.t: [coverage] Cover nummy trig: [a]sin, [a]cos, and [a]tan |
22:23 | |
samcv | i am trying to update learnxinyminutes.com for perl6 and want to double check before i change this line: # Hashes are actually arrays of Pairs | 22:24 | |
as far as i am aware perl 6 makes it easy to use hashes `as` arrays and convert between them, but the underlying implementation is very different yes? at least in perl 5 it is | 22:25 | ||
geekosaur | my understanding is that the external representation of a hash's content is an array of pairs, but it's something mroe actual-hash-like internally | ||
Zoffix | samcv, I wouldn't put that as that, since hashes are meant to be unordered, yet array means ordered. Underlying implementation should be irrelevant. | 22:26 | |
geekosaur | (because otherwise the kinds of things you want a hash for have bad performance) | ||
samcv | exactly geekosaur :) then it wouldn't really be a 'hash table' would it :p | ||
ok cool thanks Zoffix. I will update it to be more correct. | |||
it seems to print them out 'ordered' but i don't think that is its underlying structure at all {1 => one, 100 => one hundred, 15 => fifteen, 9 => nine} | 22:29 | ||
Zoffix | samcv, yeah, I think the "unordered" bit isn't done yet | 22:30 | |
samcv | so it does store them in order atm? but it's not guaranteed by the spec? | ||
geekosaur | stored in order would be kinda bad for internals | 22:31 | |
I have a vague recollection that the default output was changed to unordered and that broke some other ops that turned out to rely on it being sorted; and those other ops need to be tracked down and fixed | 22:32 | ||
(I *think* it was related to metaops?) | |||
dalek | ast: afd32c2 | (Zoffix Znet)++ | S02-types/num.t: Adjust spacing in formatting |
22:34 |