dalek | ast: cb31fae | (Zoffix Znet)++ | S06-signature/types.t: [coverage] Code.of() |
00:14 | |
Zoffix | I need help. | 00:59 | |
m: say Any ^^ sub { say "hi" } | |||
camelia | rakudo-moar 922afd: OUTPUT«sub () { #`(Sub|67444872) ... }» | ||
Zoffix | s: &infix:<^^>, \(Any, sub {}) | ||
SourceBaby | Zoffix, Sauce is at github.com/rakudo/rakudo/blob/922a...ol.pm#L114 | ||
timotimo | mhm? | ||
Zoffix | Now, here it's calling the wrong multi. I fixed it (by removing Mu from the &sub multi): | 01:00 | |
m: multi foo (Mu \a, &b) { say 'wanted' }; multi foo (Mu \a, Mu \b) { say 'wrong' }; foo 42, Code | |||
camelia | rakudo-moar 922afd: OUTPUT«===SORRY!=== Error while compiling <tmp>Bogus postfixat <tmp>:1------> \a, Mu \b) { say 'wrong' }; foo 42, Code⏏ expecting any of: infix infix stopper postfix statement end st…» | ||
Zoffix | wat | ||
m: multi foo (Mu \a, &b) { say 'wanted' }; multi foo (Mu \a, Mu \b) { say 'wrong' }; foo 42, Code | |||
camelia | rakudo-moar 922afd: OUTPUT«wanted» | ||
Zoffix | ^ so there. The multi works. BUT, I'm still getting the sub () { #`(Sub|67444872) ... } in the local build after that fix, instead of the evaluated value :/ | 01:01 | |
m: gist.github.com/zoffixznet/baadcb4...714b019c3f | |||
camelia | rakudo-moar 922afd: OUTPUT«42» | ||
Zoffix | ^ and it even works if I copy all of the ^^ multies and rename it to something else. | ||
timotimo | can you try using Callable $b instead of &b? | 01:02 | |
TimToady | you do realize that ^^ is a short-circuiting operator? | ||
yoleaux2 | 24 Sep 2016 13:43Z <dogbert17> TimToady: trying to do something about RT #129321. What should duckmap do/return if 'expression' returns undef and the element in question doesn't contain subelements? E.g. what should the following code return if anything? my @a = [1, "a"]; dd duckmap({ $_ ~~ Int ?? $_ !! Any }, @a); | ||
Zoffix | TimToady, yes, but the docs say it short curcuits when "two true arguments are found": docs.perl6.org/routine/%5E%5E | 01:03 | |
TimToady | just saying the parser might be rewriting it to sumpn else | ||
much as && turns into nqp::if and such | 01:04 | ||
Zoffix | hm | ||
There's this in the Grammar: token infix:sym<^^> { <sym> <O(|%tight_or, :iffy(1), :pasttype<xor>, :thunky<..t>)> } | 01:05 | ||
TimToady | :pasttype<xor> | ||
Zoffix has no idea what that is | 01:06 | ||
TimToady | means that it probably turns into nqp::xor | ||
timotimo | so &infix:<^^> only exists for the benefit of things like [^^] or passing &infix:<^^> around in other places? | ||
TimToady | just guessing, don't recall exactly | ||
yes | |||
Zoffix | m: say 42 && sub { 72 } | ||
camelia | rakudo-moar 922afd: OUTPUT«sub () { #`(Sub|75952216) ... }» | ||
TimToady | prolly | ||
Zoffix | Ah. Right, cause the && also has such a candidate, but I see it's not called either | 01:07 | |
TimToady | that's really say (sub { 72 } if 42) | ||
Zoffix | s: &infix:<&&>, \(42, sub { 72 }) | ||
SourceBaby | Zoffix, Sauce is at github.com/rakudo/rakudo/blob/922a...ol.pm#L103 | ||
TimToady | the parser feels it has the right to turn thunky ops into control flow :) | 01:08 | |
Zoffix | m: say [&&], 42, sub { 72 } | ||
camelia | rakudo-moar 922afd: OUTPUT«True42sub () { #`(Sub|75382592) ... }» | ||
Zoffix | m: say [&&] 42, sub { 72 } | ||
camelia | rakudo-moar 922afd: OUTPUT«sub () { #`(Sub|64206880) ... }» | ||
Zoffix | OK. Thanks. I'll just fix the signature and be done with it :) | ||
TimToady | m: say [&&] 42, die "oops" | ||
camelia | rakudo-moar 922afd: OUTPUT«oops in block <unit> at <tmp> line 1» | ||
TimToady | m: say [||] 42, die "oops" | 01:09 | |
camelia | rakudo-moar 922afd: OUTPUT«42» | ||
TimToady | m: say [&&] 0, die "oops" | ||
camelia | rakudo-moar 922afd: OUTPUT«0» | ||
TimToady | so you see it's playing mind games with you, even as metaops | ||
Zoffix | c: &infix:<&&>, \(42, {;}) | 01:11 | |
Undercover | Zoffix, The code is hit during stresstest See perl6.WTF/src_core_Bool.pm.coverage.html#L103 for details | ||
Zoffix | Interestingly, the candidate shows up as covered ^ so seems there are cases where it gets called | 01:12 | |
timotimo, using Callable instead of & still has the same behaviour | |||
timotimo | OK | 01:13 | |
MasterDuke | m: say :Ⅷ2<ab> | 01:14 | |
camelia | rakudo-moar 922afd: OUTPUT«===SORRY!=== Error while compiling <tmp>Only 'Nd' digits are allowed, not 'No' or 'Nl' numbersat <tmp>:1------> say :Ⅷ⏏2<ab> expecting any of: colon pair radix base» | ||
MasterDuke | m: say :2Ⅷ<ab> | ||
camelia | rakudo-moar 922afd: OUTPUT«===SORRY!=== Error while compiling <tmp>Malformed radix numberat <tmp>:1------> say :2⏏Ⅷ<ab> expecting any of: number in radix notation» | ||
MasterDuke | i recently made a change to "token rad_number" in Grammar.nqp to give that first error | 01:15 | |
but i'd like to see the same error in that second case | |||
and i can't seem to figure it out | 01:16 | ||
anybody have an idea? source is here: github.com/rakudo/rakudo/blob/nom/....nqp#L3412 | |||
TimToady | look for || <.malformed: 'radix number'> | 01:17 | |
timotimo | yeah | ||
was about to say | |||
MasterDuke | hmm, thought i'd tried adding another case, but now not sure, giving it a shot... | 01:20 | |
TimToady | possibly it should just be more specific, malformed radix number; expected opening bracket | 01:21 | |
the chance that anyone would actually write :2Ⅷ<ab> is so minimal I'm not sure it's worth the extra code | 01:22 | ||
MasterDuke | ah ha! that sounds like an answer to a question i asked earlier: irclog.perlgeek.de/perl6-dev/2016-0...i_13276587 | 01:23 | |
dalek | kudo/nom: 3d2a919 | (Zoffix Znet)++ | src/core/Bool.pm: Fix infix:<^^>(Mu, Callable) candidate Relevant conversation: irclog.perlgeek.de/perl6-dev/2016-0...i_13280363 |
01:24 | |
TimToady | usually, if someone does something weird, they know they've done something weird, and if it fails with a general message, they know what to try next :) | ||
MasterDuke | which was inspired by RT #129319 | 01:25 | |
i'm also basing it off of personal experience/thinking. when i found out Perl 6 supported Unicode i also tried a number somewhere, not realizing there was a difference between digits and numbers | 01:26 | ||
rt.perl.org/Ticket/Display.html?id=129319 | |||
TimToady | yes, it's an important distinction to teach these days | 01:27 | |
not sure this is the most likely teachable moment though :) | 01:28 | ||
MasterDuke | (btw, who runs synopsebot6?) | ||
TimToady dunnos | |||
TimToady dunnoes even | 01:29 | ||
Zoffix | I think timotimo has access to the box where it runs | ||
MasterDuke | TimToady: so you would vote *against* checks/specific errors about Nl+No vs Nd in more places? | ||
TimToady | that would be my inclination, in the absence of more data on the behavior of naïve users who aren't just fuzzing | 01:31 | |
geekosaur | logs suggest it's timotimo's | ||
MasterDuke | and if so, should my earlier commit to add that error in a particular case be reverted (i don't mind)? | 01:32 | |
TimToady | we do feebly try to fight bloat from time to time, and error messages need to carry their weight | ||
timotimo | i installed synopsebot6 on hack | 01:33 | |
TimToady | most users don't even know how to type Ⅷ | ||
MasterDuke | i have been thinking that erroring at a lower level would perhaps be even better | 01:34 | |
in that more cases could be covered by fewer changes | |||
timotimo | there it is | ||
Zoffix | m: say 5 xor 0 | 01:36 | |
camelia | rakudo-moar 3d2a91: OUTPUT«5» | ||
Zoffix | m: say 0 xor 0 | ||
camelia | rakudo-moar 3d2a91: OUTPUT«0» | ||
TimToady | well, you can't just check for No after Nd | ||
Zoffix | m: say 0 xor 1 | ||
camelia | rakudo-moar 3d2a91: OUTPUT«0» | ||
TimToady | m: say 2² | ||
camelia | rakudo-moar 3d2a91: OUTPUT«4» | ||
TimToady | or that will fail | ||
Zoffix | Is `xor` lazy and does it ever actually touch the second arg? | ||
TimToady | xor always has to look at the 2nd arg, but maybe not the 3rd | 01:37 | |
Zoffix | m: say 5 xor die | ||
camelia | rakudo-moar 3d2a91: OUTPUT«5Died in block <unit> at <tmp> line 1» | ||
Zoffix | aha | ||
TimToady | m: say 5 xor 5 xor die | ||
camelia | rakudo-moar 3d2a91: OUTPUT«5» | ||
TimToady | hmm | ||
that's kinda wrong | |||
oh wait | |||
m: say 5 ^^ 5 ^^ die | |||
camelia | rakudo-moar 3d2a91: OUTPUT«Nil» | ||
TimToady | prec | ||
MasterDuke | what about adding a check in nqp::radix? | 01:39 | |
dalek | ast: aec5f6e | (Zoffix Znet)++ | S02-types/bool.t: [coverage] Cover all uncovered operators in Bool.pm |
01:42 | |
TimToady | prolly won't even get there unless it parses the <> | ||
MasterDuke | of course, most of the places where nqp::radix are used pass it the capture of \d+ | 01:51 | |
TimToady | what I said | 01:52 | |
only more so :) | |||
MasterDuke | i'm going submit a revert request for my earlier commit and suggest the ticket should be closed, linking this conversation for both | 01:53 | |
and if a lot more similar tickets show up we can revisit | 01:54 | ||
TimToady | .oO(Expected an opening bracket, but you gave me an emoji, and I'm just a computer, so I don't know how to respond to that...) |
01:56 | |
dalek | kudo/nom: 3aa7254 | (Cuong Manh Le)++ | src/core/ (2 files): Fix IO.l throws exception for broken symlink Fixes RT#129162 |
03:30 | |
kudo/nom: 59e3e0e | (Zoffix Znet)++ | src/core/ (2 files): Merge pull request #885 from Gnouc/nom Fix IO.l throws exception for broken symlink |
|||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129162 | ||
ast: 01a6909 | (Cuong Manh Le)++ | S16-filehandles/filetest.t: Add test for broken symlink (#160) |
|||
kudo/nom: 3182d89 | MasterDuke17++ | src/Perl6/Grammar.nqp: Revert "Error if No/Nl chars are used in colon pairs/radix" |
|||
kudo/nom: f0b3b59 | (Zoffix Znet)++ | src/Perl6/Grammar.nqp: Merge pull request #884 from MasterDuke17/revert-883-RT129319 Revert "Error if No/Nl chars are used in colon pairs/radix" |
|||
MasterDuke | m: say ⒗ + 5 | 04:07 | |
camelia | rakudo-moar f0b3b5: OUTPUT«21» | ||
MasterDuke | TimToady: why is ^^^ allowed | ||
m: say :⒗<5> | 04:08 | ||
camelia | rakudo-moar f0b3b5: OUTPUT«===SORRY!===Argument to "say" seems to be malformedat <tmp>:1------> say⏏ :⒗<5>Confusedat <tmp>:1------> say :⏏⒗<5> expecting any of: colon pairOther potential difficulties: Unsupported…» | ||
MasterDuke | but ^^^ isn't? | ||
ShimmerFairy | m: say "⒗".uniprop | 04:21 | |
camelia | rakudo-moar f0b3b5: OUTPUT«No» | ||
ShimmerFairy | probably because it's in the "Other Number" category, which I'd argue means it maaaaybe shouldn't work in the first case either. | ||
MasterDuke | m: say 2² | 04:22 | |
camelia | rakudo-moar f0b3b5: OUTPUT«4» | ||
MasterDuke | another case where an No works | 04:23 | |
not exactly the same situation, but similar | |||
ShimmerFairy | in that case though, the superscript is specifically an operator :) | 04:24 | |
MasterDuke | yep, its .unival isn't even being used | 04:26 | |
m: say "⒗".unival; say "⒗⒗".unival | 04:28 | ||
camelia | rakudo-moar f0b3b5: OUTPUT«1616» | ||
MasterDuke | m: say "2".unival; say "22".unival | 04:29 | |
camelia | rakudo-moar f0b3b5: OUTPUT«22» | ||
TimToady | m: say "2".unival; say "22".univals | ||
camelia | rakudo-moar f0b3b5: OUTPUT«2(2 2)» | ||
TimToady | just because we allow unival numbers in general as a useful feature for ancient Sumerian programmers, doesn't mean we have to allow it in specialized spots like a radix | 04:30 | |
especially in spots limited to Nd | 04:32 | ||
MasterDuke | sure, we don't *have* to do anything, but i'm trying to figure out if there is a rule for when/where they are allowed | ||
TimToady | I foresee virtually no demand for :⒗<5> to work | ||
and if there ever is, there will be slangs :) | 04:34 | ||
MasterDuke | very likely true, i suspect i'll hardly ever use any of the unicode digits/numbers, but it just seems inconsistent | ||
TimToady | sure, I love inconsistency, consistently :) | 04:35 | |
MasterDuke | who was it who said "consistency is the hobgoblin of little minds"? | 04:36 | |
if i'm remembering the quote correctly | |||
TimToady | Emerson | 04:37 | |
MasterDuke | ah ha, and it turns out i left out an important word | 04:38 | |
TimToady | how foolish :P | ||
MasterDuke | <slow clap> | ||
TimToady | though the full quote sounds like a plug for Trump... | ||
AlexDaniel | “no demand”? What do you mean?? I need :⅞<0> ! I NEED IT!!! ;) | ||
TimToady wonders what's on the other side of his virtuality glasses | 04:39 | ||
AlexDaniel | ok well perhaps my previous example does not make sense. But this one definitely does: :༯<234> | 04:40 | |
MasterDuke | those crazy monks | 04:41 | |
AlexDaniel | m: .uniname.say for (0..0x1FFFF).grep({.chr.unival < 0}) | 04:48 | |
camelia | rakudo-moar f0b3b5: OUTPUT«TIBETAN DIGIT HALF ZERO» | ||
AlexDaniel | yeah. The only negative No in unicode | ||
TimToady | that would be like a positive Yes, right? | 04:49 | |
AlexDaniel | committable6: HEAD say “$_ → {.uniname}” for (0..0x1FFFF).grep({.uniname ~~ /«NO»/})».chr | 04:51 | |
committable6 | AlexDaniel, gist.github.com/193235d7c87d705c83...b714cda5de | 04:52 | |
TimToady | pre Christmas | ||
AlexDaniel | 🕲 → NO PIRACY ?? | ||
m: say “$_ → {.uniname}” for (0..0x1FFFF).grep({.uniname ~~ /«YES»/})».chr | 04:53 | ||
camelia | ( no output ) | ||
TimToady | m: say “$_ → {.uniname}” for (0..0x1FFFF).grep({.uniname ~~ /«YES/})».chr | 05:01 | |
camelia | rakudo-moar f0b3b5: OUTPUT«ᅌ → HANGUL CHOSEONG YESIEUNGᇰ → HANGUL JONGSEONG YESIEUNGᇱ → HANGUL JONGSEONG YESIEUNG-SIOSᇲ → HANGUL JONGSEONG YESIEUNG-PANSIOSⰅ → GLAGOLITIC CAPITAL LETTER YESTUⰵ → GLAGOLITIC SMALL LETTER YESTUㆁ → HANGUL LET…» | ||
TimToady | m: say “$_ → {.uniname}” for (0..0x1FFFF).grep({.uniname ~~ /YES»/})».chr | 05:02 | |
camelia | rakudo-moar f0b3b5: OUTPUT«𝨔 → SIGNWRITING EYES OPEN𝨕 → SIGNWRITING EYES SQUEEZED𝨖 → SIGNWRITING EYES CLOSED𝨙 → SIGNWRITING EYES HALF OPEN𝨚 → SIGNWRITING EYES WIDE OPEN𝨛 → SIGNWRITING EYES HALF CLOSED𝨜 → SIGNWRITING EYES WIDENING …» | ||
AlexDaniel | e…yes! | 05:04 | |
oh no not again | 05:18 | ||
psch | o/ | 10:14 | |
the problem with the failing NC function pointer test seems to be that we don't know everything we need to build the function that the pointer points to | |||
gist.github.com/anonymous/13aa8546...4fa44f5fb6 | 10:17 | ||
at least that's how i interpret that | |||
i mean, the test file (t/04-nativecall/19-function-pointers.t) has only one explicit 'is native' sub | 10:18 | ||
and we're dying before we reach the nativecast call | |||
target is a Sub+{NativeCall::Native[Sub,Str]}, anyway | 10:19 | ||
ooh, actually it's the invocation that doesn't work | 10:22 | ||
because we're actually dying in the last line of the test file | |||
hm, is that right that we only build the perl6 sub for an already-cast function pointer when we invoke it the first time..? | 10:23 | ||
geez i really don't know enough C for all this stuff /o\ | 11:44 | ||
pmurias | jnthn: ping | ||
psch | like, does the returned function pointer even know what symbol it points at? | ||
or does it just point at the adress? | |||
...and why does the NativeLibrary called <process> have literally *no* functions..? | 12:00 | ||
jnthn | pmurias: pong | 12:21 | |
psch | yeah, i guess that's my angle right now | ||
figure out a way to link the returned function pointer to the lib it comes from | |||
i'm still really confused that it doesn't seem to be a Pointer when it's assigned from the native call that returns it though | 12:22 | ||
m: use NativeCall; sub free(int32 $) is native { * }; say &free.perl; say &free.WHAT | 12:24 | ||
camelia | rakudo-moar f0b3b5: OUTPUT«sub free (int32 $) { #`(Sub+{NativeCall::Native[Sub,Str]}|82911560) ... }(Sub+{})» | ||
psch | ^^^ that also seems wrong. shouldn't .WHAT have the same stuff in the braces? | ||
hackedNODE | m: say WHAT sub {} but role {} | 12:26 | |
camelia | rakudo-moar f0b3b5: OUTPUT«(Sub+{<anon|70050944>})» | ||
hackedNODE | Yeah, I'd say so | ||
psch | right | 12:27 | |
oh, i looked wrong. it *is* a Pointer | 12:28 | ||
hackedNODE | s: {use NativeCall; sub free(int32 $) is native { * }; (&WHAT, \(&free))}() | ||
SourceBaby | hackedNODE, Ehhh... I'm too scared to run that code. | ||
psch | hah | 12:29 | |
hum, a pointer knowing which lib it belongs to is a bogus idea, isn't it | 12:30 | ||
jnthn | psch: Yes | 12:31 | |
psch: A function pointer in C is just a memory address | |||
We've no idea what's there | |||
Hopefully it's code but really, who knows :) | |||
psch | yeah, that's about as far as i understand it | ||
so we get an adress | 12:33 | ||
that probably points at something that we can treat as a function | |||
but we *don't* get a symbol name or library name | 12:34 | ||
jnthn | Nope | ||
In some cases there isn't a symbol/library name. A function pointer may point to machien code spat out by a JIT compiler, for example. :) | 12:35 | ||
psch | right, so we're doing the wrong thing anyway, because we're trying to look for a symbol? | ||
jnthn | .oO( The code whose bark is worse than its bite ) |
||
psch | and instead should just... do That Other Thing That Works™..? | 12:36 | |
jnthn | Doing the wrong thing where? | 12:37 | |
psch | in t/04-nativecall/19-function-pointers.t on r-j | ||
it returns the pointer correctly, casts it to a sub, and on CALL-ME runs off into NativeCallOps.build() | |||
jnthn | Ah, you don't know where in r-j things go wrong? | ||
psch | pretty much, yeah | ||
jnthn | The rest looks legit, though | 12:38 | |
psch | i know now we end up in the wrong spot | ||
jnthn | uh, the *test* | ||
You don't need a symbol etc. to suggessfully call a function pointer | |||
Just the signature that says what arguments it expects | |||
cuonglm | Hi, this ticket seems to be fixed in latest rakudo version rt.perl.org/Public/Bug/Display.html?id=123838 | ||
psch | gist.github.com/anonymous/13aa8546...4fa44f5fb6 is some of what i'm seeing | ||
jnthn | :(--> int32) for example (which means "if we call it, it returns an int32") | 12:39 | |
psch | yeah, i get that | ||
i tried setting $!setup in nativecast to get around the call into NCO.build, but that died differently | |||
i think something about BOOTCode maybe..? | |||
i don't remember exactly | |||
hackedNODE | cuonglm: thanks. It's now marked as testsneeded. | ||
(and attachment from Paul Marquess might be it; just needs to be added to roast) | 12:40 | ||
psch | oh, actually i think i couldn't bind to $!setup in the first place and that's what died | 12:41 | |
jnthn | The code in Moar is just a tad confusing, but here is the important bit: | 12:49 | |
github.com/MoarVM/MoarVM/blob/mast...all.c#L398 | |||
Notice how it doesn't try to even use the symbol if it's already got an entrypoint set | |||
psch | yeah, we're not doing that on r-j | ||
jnthn | It does pointlessly try to resolve the library | 12:50 | |
psch | so we do need the build() call in the backend, but can stop caring about libname and all that if we got an entry point | ||
jnthn | But since it's the empty string it resolves to NULL which means "curent process", but that resolution is never used anyway | ||
psch | yeah, and then it looks with an empty symbol name and dies | ||
jnthn | Ah | 12:51 | |
Yeah, in the Moar code it just copes :) | |||
But you don't need to look up a library at all | |||
psch | right | 12:52 | |
hackedNODE | m: Blob.new but role {} | 12:53 | |
camelia | rakudo-moar f0b3b5: OUTPUT«This REPR cannot change type in any mixin at gen/moar/m-Metamodel.nqp line 1318 in block <unit> at <tmp> line 1» | ||
jnthn | Blobs are native buffers, so you dn't mix in to them | 12:59 | |
*can't | |||
hackedNODE | s: Hash, "new", \( ) | 13:00 | |
SourceBaby | hackedNODE, Sauce is at github.com/rakudo/rakudo/blob/f0b3...Map.pm#L12 | ||
hackedNODE | s: Blob, "new", \( ) | ||
SourceBaby | hackedNODE, Something's wrong: ERR: Too many positionals passed; expected 2 arguments but got 3 in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 25 in block <unit> at -e line 6 | ||
hackedNODE | weird | 13:01 | |
jnthn: I'm just looking at this line that uses a sha for .WHICH and trying to think of cases where two different objects would end up being True for === due to this: github.com/rakudo/rakudo/blob/nom/...Buf.pm#L16 | 13:03 | ||
jnthn | It'll happen when you have a sha-1 collision. That's relatively rare (consider that Git uses sha-1s) | 13:05 | |
awwaiid | Rare relative to what? Winning all the world's lotteries on the same day? | 13:07 | |
hackedNODE | m: my $one = Blob.new(<42>); my $two = class Blob is Blob { method decode ($) {"*"} }.new; dd $one === $two | ||
camelia | rakudo-moar f0b3b5: OUTPUT«Bool::False» | ||
jnthn | Something like :) | ||
hackedNODE | I was thinking more of that ^, as .WHICH returns the same value for both, but I see there's no issue there. | 13:08 | |
jnthn | It's somethin glike a 1 in 10^45 chance | ||
m: say 10 ** 45 | 13:09 | ||
camelia | rakudo-moar f0b3b5: OUTPUT«1000000000000000000000000000000000000000000000» | ||
awwaiid | ok, so I guess not ALL the lotteries :) | ||
jnthn | That said, I doubt we'll do it that way forevermore :) | 13:10 | |
hackedNODE | (as for the sourcery issue above, it's just due to it attempting to call .^can on an unpunned role) | 13:11 | |
m: Blob.^can("new") | 13:12 | ||
camelia | rakudo-moar f0b3b5: OUTPUT«Too many positionals passed; expected 2 arguments but got 3 in block <unit> at <tmp> line 1» | ||
hackedNODE | m: class :: does Blob {} | 13:21 | |
camelia | rakudo-moar f0b3b5: OUTPUT«===SORRY!=== Error while compiling <tmp>P6opaque: missing attribute protocol in composeat <tmp>:1» | ||
hackedNODE | Same reason as infix:<but> I guess | 13:22 | |
psch | oh grr | 13:23 | |
the only javadoc i can find online for jna is for version 3.2.7 or somesuch | |||
and we're using 4.0.0 | |||
...i don't wanna clone their github repo and browse the javadoc locally :| | 13:24 | ||
oh, that doesn't even seem to be right either anyway | 13:25 | ||
'cause the constructor they say i should be able to use doesn't exist | 13:28 | ||
nine_ | awwaiid: a SHA-1 hash is a large enough number that all the computers in the world could not brute force the number space before the universe ends. You'd need a targeted attack to have even a chance and even then no collision has been found so far. | 13:32 | |
Human imagination simply doesn't work anymore for such large numbers. | 13:33 | ||
psch | aha, Function has "getter" functions for Functions, the constructors are all protected | 13:42 | |
err, methods | |||
hackedNODE | How come Blob:U is 1 .elems? | 13:43 | |
m: dd Blob.elems; dd Blob.new.elems | |||
camelia | rakudo-moar f0b3b5: OUTPUT«10» | ||
hackedNODE | m: dd 42.elems; # is that for this type of "anything can be 1 item list" | 13:44 | |
camelia | rakudo-moar f0b3b5: OUTPUT«1» | ||
timotimo | i think so | 13:45 | |
hackedNODE | k | ||
psch | multi method elems(Blob:U:) { 1 } | ||
it *is* hardcoded, in any case | |||
so, yeah, it's probably for that kind of consistency | |||
ilmari | m: dd Mu.elems | 13:53 | |
camelia | rakudo-moar f0b3b5: OUTPUT«Method 'elems' not found for invocant of class 'Mu' in block <unit> at <tmp> line 1» | ||
psch | m: use nqp; say nqp::elems(Mu) | 13:56 | |
camelia | rakudo-moar f0b3b5: OUTPUT«This type (Mu) does not support elems in block <unit> at <tmp> line 1» | ||
psch | m: say Any.elems | 13:57 | |
camelia | rakudo-moar f0b3b5: OUTPUT«1» | ||
psch | m: use nqp; say nqp::elems(Any) | ||
camelia | rakudo-moar f0b3b5: OUTPUT«This type (Any) does not support elems in block <unit> at <tmp> line 1» | ||
ilmari | m: dd Any.elems | 13:58 | |
camelia | rakudo-moar f0b3b5: OUTPUT«1» | ||
hackedNODE | m: (|^10000).gist.comb(/\d+/).elems.say | 13:59 | |
camelia | rakudo-moar f0b3b5: OUTPUT«100» | ||
hackedNODE | m: [|^10000].gist.comb(/\d+/).elems.say | 14:00 | |
camelia | rakudo-moar f0b3b5: OUTPUT«10000» | ||
hackedNODE | m: Blob.new(|^10000).gist.comb(/\d+/).elems.say | 14:01 | |
camelia | rakudo-moar f0b3b5: OUTPUT«8597» | ||
hackedNODE | mm... okay | ||
timotimo | because letters | ||
hackedNODE | I was more wondering about arbitrary choice to limit List to 100 els, but not other choices, but I don't think I care abou this enough to follow it further :) | 14:03 | |
timotimo | oh, you mean the gist thing | 14:05 | |
hackedNODE | yeah | 14:06 | |
Woodi_ | for me this thing with keeping using SHA1 is just strange: en.wikipedia.org/wiki/SHA-1#Attacks and git do that too. do SHA1 kids are worse becouse they are all backdoored ? :) anyway, would be nice if using SHA1 and others was just configuration option... | ||
hackedNODE | :/ but look at those numbers. 2^80, 2^60. It'll be awhile before your computer will be able to work with that many Blobs :) | 14:08 | |
Woodi_ | hackedNODE: I prefer "As such, the authors recommend that SHA-1 be deprecated as quickly as possible." number :) | 14:10 | |
nine_ | Woodi_: what problem would that solve? | ||
psch | "One attack against SHA-1 is Marc Stevens[39] with an estimated cost of $2.77M to break a single hash value by renting CPU power from cloud servers." | 14:11 | |
Woodi_ | nine_: eg. someone switch precompiled module using sha ? I don't know. why not have something better ? | ||
awwaiid | There is no point in "better" unless there is a problem being solved | 14:12 | |
Woodi_ | psch: that's pure&funny marketing :) | ||
nine_ | Woodi_: context matters. The authors recommend deprecation of SHA-1 _as part of a cryptographic security device_. | ||
psch | Woodi_: but *all* attacks in your link are either that expensive or really slow | ||
ah, no there's one that's only $75K - $120K | 14:13 | ||
still, consider the vector | 14:14 | ||
Woodi_ | psch: and wikipedia is place where state of the art cryptography is announced ;) | ||
nine_ | The attacks are that - attacks. Someone trying to find a collision on purpose. This is not something that matters in any way for our use cases. | ||
psch | right | ||
hackedNODE | Woodi_: replace... with what? The attacks in your link are about making a hash that will match some content. You don't need that for modules, since you already know the original value it was computer from. | ||
mst | Woodi_: sha1 is fine for uniquely identifying something | 14:15 | |
psch | the applicable vector here is "someone writes a malicous module that replaces a different module with the same sha-1" | ||
timotimo | well, you want to have a module that computes to the same hash, but has malicious code in it | ||
mst | Woodi_: if you're trying to -protect- something, like a password, bcrypt is better | ||
Woodi_: replacing sha1 in CUR would *not* be better. it would only be *slower* | |||
awwaiid | well I think people could mistakenly use .WHICH for some other comparison? | ||
nine_ | psch: if it has the same sha-1, rakudo will tell you that the module is already installed | ||
mst | Woodi_: I fail to see why we should give you a configuration option to make perl6 slower for no good reason :) | ||
psch | nine_: right, and the :auth and all also have to be same anyway first, don't they | ||
mst | Woodi_: if you want a slower perl6 and no help, look at 'man nice' | ||
nine_ | Even having the configuration option will make Perl 6 slower | 14:16 | |
mst | yes | ||
hence my proposing Woodi_ consults 'man nice' if he wants a slower perl6 | |||
Woodi_ | mst: slower hash is better in eg. passwd | ||
mst | Woodi_: and none of the things we're discussing are passwords | ||
dalek | p: a840081 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/NativeCallOps.java: Fix building of native functions pointers for the JVM. |
||
mst | Woodi_: I already said bcrypt is better for passwords | 14:17 | |
Woodi_: please read what I actually said. all of it. | |||
nine_ | psch: the attacker would have to chose a short-name, version and auth combination that produces the same sha-1 as the module to be replaced. And then we'd refuse to install because it's already there :) | ||
Woodi_ | but if you all say not to worry then I trust you it's good for me :) | ||
mst | Woodi_: this is nothing like passwords. | ||
dalek | kudo/nom: 5d909c9 | peschwa++ | tools/build/NQP_REVISION: Bump NQP_REVISION for R-J NativeCall fix |
||
mst | nine_: anyway, if the attacker can write into the CUR, we've already lost | ||
psch | nine_: well, unless they replace it locally, but then i'm wondering why they're not doing a useful attack... :) | 14:18 | |
nine_ | mst: I'm quite sure there's lots and lots and lots of ways to attack our infrastructure :) | ||
timotimo | normally, multiple "not so terrible" vulnerabilities are chained together for a useful exploit | ||
but i can't see a sha1 collision in CUR as being part of such a chain | |||
(famous last words) | |||
psch | anyway, down to one failure in r-j 'make test' | ||
anyone want to fix that one? i fixed like, maybe 20 or so in the last few days :P | 14:19 | ||
hackedNODE thinks perl6.party/post/Exploiting-Perl-6-...ency-Chain would be way easier and cheaper to do than a SHA1 collision :) | |||
mst | timotimo: right, as Raymond Chen would put it, you're already on the other side of the air-tight hatchway | 14:20 | |
Woodi_ | btw. for the future, I propose to not worry about governments and agencies, etc. :) but make things as much secure for business and anti-hacking purposes | ||
hackedNODE | m: my $b = Buf.new<1 2 3>; dd $b.shift; dd $b | 14:21 | |
camelia | rakudo-moar f0b3b5: OUTPUT«Cannot call 'shift' on an immutable 'List' in block <unit> at <tmp> line 1» | ||
hackedNODE | Oh, never mind me. Missing colon :) | ||
timotimo | hackedNODE: you can use invisible characters for mixing stuff into the code to make it look benign and still change the sha1 hash | 14:22 | |
but really you want to have malicious code in there, and "use Anguish" seems suspicious :) | |||
hackedNODE | Nah, that article is about augmenting core stuff from deep in the deps, not Anguish :) | 14:23 | |
timotimo | oh, right | ||
pmurias | jnthn: 'static' QAST::Vars are meant to be immutable? | 14:49 | |
jnthn: rakudo emits code that binds to them for role Foo[::T] {...} | 14:50 | ||
dalek | ast: e4a190d | (Zoffix Znet)++ | S (2 files): [coverage] cover all* nudity in Buf.pm Except for some .splice candidates that need polishing[^1][^2] [1] rt.perl.org/Ticket/Display.html?id=129359 [2] rt.perl.org/Ticket/Display.html?id=129358 |
15:27 | |
kudo/nom: 74b5d7f | (Zoffix Znet)++ | t/spectest.data: Add S32-container/buf.t test file |
15:28 | ||
lizmat | Zoffix: are you looking at adding those extra splice candidates, or shall I ? | 15:34 | |
hackedNODE | lizmat: I can do it tonight. | ||
jnthn | pmurias: No, it just means they're initialized with a default value that is a wval | 15:35 | |
hackedNODE | Not exactly sure what's a good way to address the second ticket, though | 15:36 | |
jnthn | pmurias: Constrasted with contvar that does similar but clones | ||
hackedNODE | m: my $b = Buf.new: <1 2 3>; $b.splice: 10 | ||
camelia | rakudo-moar 5d909c: OUTPUT«Len element to subbuf out of range. Is: -7, should be in 0..3 in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
lizmat | hackedNODE: will refrain from looking at it then :-) | 15:39 | |
RabidGravy | every once in a while I hit up against some kind of deadlock between IO::Socket::Async and sockets that aren't managed by Perl 6 | 15:47 | |
but it's a real pain to golf down to something RTable as it requires some NC thing or an external program | 15:48 | ||
timotimo | hackedNODE: would you tell me if the coverage report parsing is any faster with my latest moarvm commit on that branch? | ||
hackedNODE | timotimo: I'd be surprised if it wouldn't be :) I'll give you the numbers for how much faster the new version is when I get home tonight | 15:51 | |
timotimo | cool | 15:52 | |
of course if you send the output of --moar through "grep annotation:" it'd be as fast as it can be | 15:53 | ||
maybe it'd be faster to send the whole file through a .comb, but that'd load the whole file's contents into ram at once | |||
it's 32 megabytes big and moar'll probably blow that up to 4x size because MVMCodepoint32 | 15:54 | ||
hackedNODE | that doesn't sound terrible :) | ||
timotimo | it sounds bad to me, honestly | ||
i'd rather do it line-by-line | 15:55 | ||
hackedNODE | m: 32*4 | ||
camelia | rakudo-moar 74b5d7: OUTPUT«WARNINGS for <tmp>:Useless use of "*" in expression "32*4" in sink context (line 1)» | ||
hackedNODE | m: say 32*4 | ||
camelia | rakudo-moar 74b5d7: OUTPUT«128» | ||
timotimo | do you have that much ram? :) | ||
hackedNODE | 128MB? | ||
I think so: tpm2016-2.zoffix.com/gce-cpus.png | 15:56 | ||
But on a serious note...yeah, even on my weakest server I currently have 1GB free | |||
timotimo | well, you said you wanted to do a coverage report parse for every single .t file in the spec test repo | 15:58 | |
ideally multiple in parallel | |||
m: say 128 * 32 | |||
camelia | rakudo-moar 74b5d7: OUTPUT«4096» | ||
timotimo | that'd be 4 gigabytes for *just* that bit | ||
hackedNODE | :) | 15:59 | |
I was thinking more of loading the file (and setting) once and then looping over individual test file *results* and generating results for them | 16:00 | ||
timotimo | ah | ||
well, that'd be fine, too | |||
pmurias | jnthn: docs/qast.markdown:333, "No attempt is made to ensure you do not re-bind such a symbol, but do not do this; runtimes are free to turn lookups of static lexical symbols into direct references to the symbol. | 16:09 | |
" | |||
jnthn | pmurias: Hmm | ||
If we actually make that happen then we need another name for it :) | |||
Because the current semantics as implemented are too useful not to have :) | 16:10 | ||
(We rely on them heavily.) | |||
pmurias | jnthn: should I update the docs? | 16:28 | |
jnthn | pmurias: Yes, please :) | 16:29 | |
dalek | p: 65ed052 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js: [js] Print out code containing PRINTME for debugging purposes. |
16:51 | |
nqp: 2f55a75 | (Pawel Murias)++ | nqp-js-on-js/.gitignore: | |||
nqp: [js] Ignore some build products. | |||
kudo/nom: 6974b8b | (Zoffix Znet)++ | src/core/Proc (2 files): Propagate Proc::Async's command to Proc.command Fixes RT#129362: rt.perl.org/Ticket/Display.html?id=129362 |
17:01 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129362 | ||
dalek | ast: 8e1a1cc | (Zoffix Znet)++ | S17-procasync/basic.t: Proc::Async's Proc has correct .command RT#129362: rt.perl.org/Ticket/Display.html?id=129362 |
17:02 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129362 | ||
dalek | kudo/nom: 38ec2e2 | (Zoffix Znet)++ | src/core/Proc/Async.pm: Do not avail Mu.new candidates for Proc::Async.new Otherwise, we get LTA errors when incorrect args are used: $ ./perl6 -e 'my @some-args; await Proc::Async.new(|@some-args).start' Use of uninitialized value <element> of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at -e line 1 no such file or directory in block <unit> at -e line 1 |
17:15 | |
ast: 34b31b2 | (Zoffix Znet)++ | S17-procasync/basic.t: attempting to create Proc::Async with wrong arguments throws |
17:16 | ||
ast: 64e0b53 | (Zoffix Znet)++ | S02-types/capture.t: [coverage] Cover Capture.antipairs |
18:35 | ||
ast: e4139ff | (Zoffix Znet)++ | S17-channel/basic.t: [coverage] Cover Channel.elems |
18:41 | ||
ast: 3362fb7 | (Zoffix Znet)++ | S04-blocks-and-statements/pointy.t: [coverage] Cover Code.[line|file] |
18:59 | ||
ast: c6efce6 | (Zoffix Znet)++ | S04-blocks-and-statements/pointy.t: Fix typo in comment |
19:01 | ||
masak | Zoffix: "avail"? :) | 19:09 | |
hackedNODE | masak: "make available". | 19:12 | |
hackedNODE invokes the Second Language amendment | |||
masak | is that the one written by Humpty Dumpty? :) | 19:13 | |
dogbert17 | hackedNODE: I think we (I can do a PR) should apply TimToadys fix RT #129321 and then submit a new bug for the fact that duckmap doesn't retain structure. What's your opinion? | 19:14 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129321 | ||
dogbert17 | *fix for RT ... | ||
hackedNODE | dogbert17: sounds good | ||
dogbert17 | ok, I'll fix the PR | ||
dogbert17 spectesting zzz... | 19:33 | ||
dalek | ast: ad9f949 | (Zoffix Znet)++ | S32-num/complex.t: [coverage] Complex.[reals|floor] |
19:50 | |
RabidGravy | still quite shocked at the halving of the time it took to test 57 modules since the last time | 19:51 | |
(less than a month ago,) | |||
dogbert17 | hackedNODE: PR finally sent | 20:10 | |
dalek | kudo/nom: ca93ac9 | (Jan-Olof Hendig)++ | src/core/metaops.pm: Fix for RT #129321 Under some circumstances duckmap could recurse indefinitely. The problem was that if the expression returned undef for an argument the code would gladly take the same argument, which caused the problem, and call duckmap again leading to a hang or OOM condition. After a discussion with with TimToady++ in #perl6 he came up with a solution to the problem which is what this commit contains. |
20:43 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129321 | ||
rakudo/nom: 447d592 | lizmat++ | src/core/metaops.pm: | |||
rakudo/nom: Merge pull request #886 from dogbert17/nom | |||
rakudo/nom: | |||
dogbert17 | oO | 20:44 | |
dogbert17 time to report the other duckmap bug which TimToady spotted | 20:46 | ||
geekosaur | with with | 20:51 | |
dogbert17 | :( | 20:57 | |
should it be fixed? | 20:58 | ||
Zoffix | No | ||
dogbert17 | Zoffix: rt.perl.org/Public/Bug/Display.html?id=129363 | 20:59 | |
Zoffix | Genius... my building sent everyone 24-notice of entry: "Other instructions: kindly leave the front door open between 9AM and 5PM." Anyone wanna go rob about 150 apartments? | 21:00 | |
dogbert17 | craftsmen visit? | 21:02 | |
Zoffix | "Painting the front door".... humans and their silly aesthetics ~_~ | 21:04 | |
dogbert17 | m: my @a = [1, "a"]; dd duckmap(-> Int $x { $x ~~ Int ?? $x !! Any }, @a) | 21:06 | |
camelia | rakudo-moar 447d59: OUTPUT«(1, "a")» | ||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/09/26/...oar-tests/ | ||
dogbert17 | looks as if we can close RT #129321 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129321 | ||
Zoffix | lizmat++ good weekly | 21:08 | |
dogbert17, it still needs tests | 21:09 | ||
dogbert17 | uh oh | ||
[Coke] | lizmat++ # weekly etc. | ||
arnsholt | Zoffix: Actually, repainting every once in a while is an important part of maintenance as well =) | 21:17 | |
Otherwise the door will rot more easily (or rust, if it's metal) | |||
Zoffix | fine :) | 21:20 | |
lizmat | good night, #perl6-dev! | 21:50 | |
Zoffix | night | 21:53 | |
timotimo | no mention of inline::perl5 performance improvements in the weekly :S | 21:57 | |
Zoffix | It was in the previous one, I think | 22:24 | |
timotimo | OK | 22:26 | |
Zoffix | Also, I won't have time to test your coverage changes today, so if not tomorrow, then Friday :) | 22:54 | |
timotimo | understood | 22:55 | |
Zoffix: i measured it myself; it goes from 1:08m down to 18.81s (in total) | 23:09 |