Use memcmp for TextAttribute & TextColor comparison

TextAttribute and TextColor are commonly used structures in hot paths.
This commit replaces more complex comparisons where each field is compared
independently with a single call to memcmp. This compiles down to just
a few instructions. This reduces code and binary size and improves
performance for paths were TextAttributes need to be compared.
PR Checklist

[x] Supports #10563
[x] CLA signed. If not, go over here and sign the CLA
[x] Tests added/passed
[ ] Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
[ ] Schema updated.
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

termbench still works ✔

Co-authored-by: Leonard Hecker<EMAIL_ADDRESS>

This feels a lot like a micro-optimization... doing one comparison instead of four and growing the non-default case to five comparisons doesn't seem like it's going to win us any races.
Do you have profiling data for this change?
If this really is a micro-optimization we want to take on, I'd rather it be using memcmp or similar. It optimizes down to a branchless 4-byte comparison under /O2.
bool operator==(TextColor const &,TextColor const &) PROC               ; operator==, COMDAT
        mov     eax, DWORD PTR [rcx]
        cmp     eax, DWORD PTR [rdx]
        sete    al
        ret     0

/cc @lhecker

(under ARM64 is optimizes down to an actual call to memcmp. To be clear: i am not recommending we do this)

+1 for using memcmp on primitive types.
Technically it will not be legal for this struct (because it has a constructor and thus isn’t a so called trivial type), but it‘ll be fine anyways for our use case.

This is what bugs me in the scrolling stress test time bash -c 'yes | head -n1000000' :

The color != it->TextAttr() is surprisingly expensive. Here's in TextAttribute:
constexpr bool operator==(const TextAttribute& a, const TextAttribute& b) noexcept
{
    return a._wAttrLegacy == b._wAttrLegacy &&
           a._foreground == b._foreground &&
           a._background == b._background &&
           a._extendedAttrs == b._extendedAttrs &&
           a._hyperlinkId == b._hyperlinkId;
}

With both _foreground & _background being TextColor, I think this PR can help. With this PR, it's better, but still not good. This PR reduces 1%-2% of the CPU. You can still see the color != it->TextAttr() in the hotpath.

If these 10 comparisons are a significant burden via our compiler, I'm blown away.

This is from godbolt for:
int main() {
   TextAttribute a,b;
   scanf("%d, %d", &a._hyperlinkId, &b._hyperlinkId);
   if (a == b) {
       printf("Equal");
   }
}

x64-msvc v19.29 VS 16.10
TextColor
bool operator==(TextColor const &,TextColor const &) PROC               ; operator==, COMDAT
$LN5:
        mov     QWORD PTR [rsp+16], rdx
        mov     QWORD PTR [rsp+8], rcx
        sub     rsp, 24
        mov     rax, QWORD PTR a$[rsp]
        mov     rcx, QWORD PTR b$[rsp]
        movzx   ecx, BYTE PTR [rcx+3]
        cmp     BYTE PTR [rax+3], cl
        jne     SHORT $LN3@operator
        mov     rax, QWORD PTR a$[rsp]
        movzx   eax, BYTE PTR [rax]
        mov     rcx, QWORD PTR b$[rsp]
        movzx   ecx, BYTE PTR [rcx]
        cmp     eax, ecx
        jne     SHORT $LN3@operator
        mov     rax, QWORD PTR a$[rsp]
        movzx   eax, BYTE PTR [rax+1]
        mov     rcx, QWORD PTR b$[rsp]
        movzx   ecx, BYTE PTR [rcx+1]
        cmp     eax, ecx
        jne     SHORT $LN3@operator
        mov     rax, QWORD PTR a$[rsp]
        movzx   eax, BYTE PTR [rax+2]
        mov     rcx, QWORD PTR b$[rsp]
        movzx   ecx, BYTE PTR [rcx+2]
        cmp     eax, ecx
        jne     SHORT $LN3@operator
        mov     DWORD PTR tv82[rsp], 1
        jmp     SHORT $LN4@operator
$LN3@operator:
        mov     DWORD PTR tv82[rsp], 0
$LN4@operator:
        movzx   eax, BYTE PTR tv82[rsp]
        add     rsp, 24
        ret     0

TextAttribute
bool operator==(TextAttribute const &,TextAttribute const &) PROC           ; operator==, COMDAT
$LN5:
        mov     QWORD PTR [rsp+16], rdx
        mov     QWORD PTR [rsp+8], rcx
        sub     rsp, 56                             ; 00000038H
        mov     rax, QWORD PTR a$[rsp]
        movzx   eax, WORD PTR [rax]
        mov     rcx, QWORD PTR b$[rsp]
        movzx   ecx, WORD PTR [rcx]
        cmp     eax, ecx
        jne     SHORT $LN3@operator
        mov     rax, QWORD PTR b$[rsp]
        add     rax, 4
        mov     rcx, QWORD PTR a$[rsp]
        add     rcx, 4
        mov     rdx, rax
        call    bool operator==(TextColor const &,TextColor const &)          ; operator==
        movzx   eax, al
        test    eax, eax
        je      SHORT $LN3@operator
        mov     rax, QWORD PTR b$[rsp]
        add     rax, 8
        mov     rcx, QWORD PTR a$[rsp]
        add     rcx, 8
        mov     rdx, rax
        call    bool operator==(TextColor const &,TextColor const &)          ; operator==
        movzx   eax, al
        test    eax, eax
        je      SHORT $LN3@operator
        mov     rax, QWORD PTR a$[rsp]
        mov     rcx, QWORD PTR b$[rsp]
        movzx   ecx, BYTE PTR [rcx+12]
        cmp     BYTE PTR [rax+12], cl
        jne     SHORT $LN3@operator
        mov     rax, QWORD PTR a$[rsp]
        movzx   eax, WORD PTR [rax+2]
        mov     rcx, QWORD PTR b$[rsp]
        movzx   ecx, WORD PTR [rcx+2]
        cmp     eax, ecx
        jne     SHORT $LN3@operator
        mov     DWORD PTR tv91[rsp], 1
        jmp     SHORT $LN4@operator
$LN3@operator:
        mov     DWORD PTR tv91[rsp], 0
$LN4@operator:
        movzx   eax, BYTE PTR tv91[rsp]
        add     rsp, 56                             ; 00000038H
        ret     0
bool operator==(TextAttribute const &,TextAttribute const &) ENDP

And finally main:
main    PROC
$LN4:
        sub     rsp, 72                             ; 00000048H
        lea     rcx, QWORD PTR a$[rsp]
        call    TextAttribute::TextAttribute(void)             ; TextAttribute::TextAttribute
        lea     rcx, QWORD PTR b$[rsp]
        call    TextAttribute::TextAttribute(void)             ; TextAttribute::TextAttribute
        lea     r8, QWORD PTR b$[rsp+2]
        lea     rdx, QWORD PTR a$[rsp+2]
        lea     rcx, OFFSET FLAT:$SG5282
        call    scanf
        lea     rdx, QWORD PTR b$[rsp]
        lea     rcx, QWORD PTR a$[rsp]
        call    bool operator==(TextAttribute const &,TextAttribute const &)      ; operator==
        movzx   eax, al
        test    eax, eax
        je      SHORT $LN2@main
        lea     rcx, OFFSET FLAT:$SG5284
        call    printf
$LN2@main:
        xor     eax, eax
        add     rsp, 72                             ; 00000048H
        ret     0
main    ENDP

x86-64 clang 12.0
main:                                   # @main
        sub     rsp, 40
        movabs  rax,<PHONE_NUMBER>
        mov     qword ptr [rsp + 27], rax
        mov     dword ptr [rsp + 24], 0
        mov     word ptr [rsp + 35], 2
        mov     qword ptr [rsp + 11], rax
        mov     dword ptr [rsp + 8], 0
        mov     word ptr [rsp + 19], 2
        lea     rsi, [rsp + 26]
        lea     rdx, [rsp + 10]
        mov     edi, offset .L.str
        xor     eax, eax
        call    __isoc99_scanf
        movzx   eax, word ptr [rsp + 24]
        cmp     ax, word ptr [rsp + 8]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 31]
        cmp     al, byte ptr [rsp + 15]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 28]
        cmp     al, byte ptr [rsp + 12]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 29]
        cmp     al, byte ptr [rsp + 13]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 30]
        cmp     al, byte ptr [rsp + 14]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 35]
        cmp     al, byte ptr [rsp + 19]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 32]
        cmp     al, byte ptr [rsp + 16]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 33]
        cmp     al, byte ptr [rsp + 17]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 34]
        cmp     al, byte ptr [rsp + 18]
        jne     .LBB0_12
        mov     al, byte ptr [rsp + 36]
        cmp     al, byte ptr [rsp + 20]
        jne     .LBB0_12
        movzx   eax, word ptr [rsp + 26]
        cmp     ax, word ptr [rsp + 10]
        jne     .LBB0_12
        mov     edi, offset .L.str.1
        xor     eax, eax
        call    printf
.LBB0_12:
        xor     eax, eax
        add     rsp, 40
        ret
.L.str:
        .asciz  "%d, %d"

.L.str.1:
        .asciz  "Equal"

x86-64 GCC 10.3
.LC1:
        .string "%d, %d"
.LC2:
        .string "Equal"
main:
        sub     rsp, 40
        mov     rax, QWORD PTR .LC0[rip]
        mov     edi, OFFSET FLAT:.LC1
        lea     rdx, [rsp+18]
        lea     rsi, [rsp+2]
        mov     DWORD PTR [rsp], 0
        mov     QWORD PTR [rsp+4], rax
        mov     QWORD PTR [rsp+20], rax
        xor     eax, eax
        mov     BYTE PTR [rsp+12], 0
        mov     DWORD PTR [rsp+16], 0
        mov     BYTE PTR [rsp+28], 0
        call    __isoc99_scanf
        movzx   eax, WORD PTR [rsp+16]
        cmp     WORD PTR [rsp], ax
        je      .L11
.L2:
        xor     eax, eax
        add     rsp, 40
        ret
.L11:
        movzx   eax, BYTE PTR [rsp+23]
        cmp     BYTE PTR [rsp+7], al
        jne     .L2
        movzx   eax, BYTE PTR [rsp+20]
        cmp     BYTE PTR [rsp+4], al
        jne     .L2
        movzx   eax, BYTE PTR [rsp+21]
        cmp     BYTE PTR [rsp+5], al
        jne     .L2
        movzx   eax, BYTE PTR [rsp+22]
        cmp     BYTE PTR [rsp+6], al
        jne     .L2
        movzx   eax, BYTE PTR [rsp+27]
        cmp     BYTE PTR [rsp+11], al
        jne     .L2
        movzx   eax, BYTE PTR [rsp+24]
        cmp     BYTE PTR [rsp+8], al
        jne     .L2
        movzx   eax, BYTE PTR [rsp+25]
        cmp     BYTE PTR [rsp+9], al
        jne     .L2
        movzx   eax, BYTE PTR [rsp+26]
        cmp     BYTE PTR [rsp+10], al
        jne     .L2
        movzx   eax, WORD PTR [rsp+18]
        cmp     WORD PTR [rsp+2], ax
        jne     .L2
        movzx   eax, BYTE PTR [rsp+28]
        cmp     BYTE PTR [rsp+12], al
        jne     .L2
        mov     edi, OFFSET FLAT:.LC2
        xor     eax, eax
        call    printf
        jmp     .L2
.LC0:
        .byte   0
        .byte   0
        .byte   0
        .byte   2
        .byte   0
        .byte   0
        .byte   0
        .byte   2

I don't know assembly that well. Can someone enlighten me on this? Is MSVC a bit worse, worse, or way worse?

This is from godbolt for the following demo code (all under O3):

If you were in fact using /O3, that's probably your problem. That's not a valid option as far as I'm aware, so it's likely just ignored. I believe you need /O2 for maximum optimizations.

Yeah maybe. I am very new to godbolt and the assembly word. Please don’t hesitate to point out any mistakes I made.
获取 Outlook for iOShttps://aka.ms/o0ukef

发件人: James Holderness @.>
发送时间: Thursday, July 8, 2021 10:07:34 PM
收件人: microsoft/terminal @.>
抄送: Chester Liu @.>; Author @.>
主题: Re: [microsoft/terminal] Add fast path for TextColor equal check (#10566)
This is from godbolt for the following demo code (all under O3):
If you were in fact using /O3, that's probably your problem. That's not a valid option as far as I'm aware, so it's likely just ignored. I believe you need /O2 for maximum optimizations.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/pull/10566#issuecomment-876470476, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABD6BL45YLEO5YCMMTX3LCDTWWWKNANCNFSM474JGDOA.

For the record, I'm also +1 on using memcmp if it makes a significant difference. If we're worried about the correctness of it, could we not throw in a static_assert or something that verifies the class size is what we expect it to be for the given field sizes? Hopefully then there's less risk of something breaking unexpectedly as a result of packing/alignment changes.

Thanks guys for the advice. This change now bring the CPU usage of TextAttr comparison down to 1%:

OK, the actual performance gain from this PR is very limited. But I still like some of the tricks in it. So feel free to merge this or leave it. I'm moving to #10596 from now on.

OK, the actual performance gain from this PR is very limited.

I dunno if I love the tricks given that it doesn't net us much gain. It's cool that we're using C++ fixtures to ensure that we're not doing something ~ ~ weird ~ ~, but... perhaps our optimization talent is better-spent somewhere else?

@DHowett I was wrong the performance gain from this PR being very limited. With the initial work in #10596 done on my experimental branch, this PR leads to ~10%+ in throughput (3.6s -> 3.3s). And even after the fix the comparison is still somewhat expensive.
Let's just leave the PR here and I can come back to this later.

@lhecker do you want this? I was going to close this,

@skyline75489 I'm personally still in favor of this PR, but I believe it has to wait for 1.12.

@lhecker, do you still want this? I think I'm OK with it as well because despite its limited performance value for this specific circumstance, it's a nice example of how to mechanically do this that may be more applicable to other performance things we do in the future. We could look it up and go "OH LIKE THAT" and copy/paste.

Hey, rando ex-NT perf dude here just looking around at stuff after being away from code for a long time, a few observations and questions...

Why isn't the compiler making this same optimization? Usually it doesn't because the field layout is such that there is dead space within the struct/class which means that the memcmp based comparisons isn't a good deal anyhow. @j4james above mentions using static asserts to protect the correctness of the approach, did anyone talk with the compiler team about why the best cost isn't generated in the first place? How big is the struct?
@DHowett above mentions the branchless four byte comparison. If you really can't get the "natural" comparison to optimize correctly, you can make the struct a union (is this code portable? If not, you can make it a nameless union to avoid syntax hell if you don't mind taking a MSVC dependency) and just compare the u4 branch of the union.
Before going haywire on optimizing this comparison, it might be worth looking into why you're making this comparison so often. e.g. is there a place where you've got a linear search where you could use something with log time or a hash table for (statistically) constant time. Or reorder things or have a lookaside where the most common match is in a certain place and you don't have to search the table. Sorry if these are obvious techniques but just getting them on the table, I'm far down the RaymondC path of guessing why you got here in the first place.

Anyhow, take that for what it's worth. I'm surprised the compiler didn't generate optimal code in the first place. I'd start there. Make sure you don't have holes in the struct and then try doing the comparisons "in order" so the compiler can "realize" that you're just comparing the whole thing. This kind of stuff is everyday bread and butter of the optimizer so something funky is going on for it not to have recognized it off the bat.

Why isn't the compiler making this same optimization?

This would work in C, but in C++ a struct doesn't get comparison operators by default.

Before going haywire on optimizing this comparison, it might be worth looking into why you're making this comparison so often. e.g. is there a place where you've got a linear search where you could use something with log time or a hash table for (statistically) constant time.

We're basically decompressing a run-length-encoded array just to check where the runs change. Instead we can just iterate the runs in the compressed array and skip all comparisons.
However this will still be useful since we still need to run such comparisons elsewhere (for instance during insertions into the run-length-encoded array). In the future the benefit of this PR will simply be less obvious.
Basically, since C++ doesn't generate comparison operators by default we should help it, by using an equivalent memcmp wherever we know it's safe to do so.
As soon as we use C++20 we'll be able to write:
auto operator<=>(const TextAttribute&) const = default;

which will then allow == to behave practically identical to C.

OK well that's interesting. In any case, looking at the original operator == implementation, the fields are not compared in "natural" order and since && is short-circuiting, it's vaguely possible that the optimizer can't see past the weird order of field access. For some reason the project isn't building right on my machine which is a separate issue I'm working through but you might try just rewriting operator== as...
constexpr bool operator==(const TextAttribute& a, const TextAttribute& b) noexcept
{
return a._wAttrLegacy == b._wAttrLegacy &&
a._hyperlinkId == b._hyperlinkId &&
a._foreground == b._foreground &&
a._background == b._background &&
a._extendedAttrs == b._extendedAttrs;
}
(basically comparison of _hyperlinkId was at the end instead of second as per the layout)
Independently, it seems like you have a basic correctness problem with the sizeof() based memcmp solution. The sizeof(TextAttribute) is going to be 16 but as far as I can tell only 13 bytes are filled in by explicit field references (unless UNIT_TESTING is defined but still then there's a big alignment hole, the contents of which are uninitialized).
Fortunately since it's final there's no vtable so you could play the memset(this, 0, sizeof(*this)) game in the constructor but this is really going down a worse path. I think you should coerce the compiler to do the right thing without any of these games. (This could break whatever the stuff is under UNIT_TESTING, if it has vtables, the memset() technique famously will screw that up badly.)
I'm trying to find the definitions of TextColor and ExtendedAttributes to understand them better. TextColor seems nontrivial (given what I saw in the TextAttribute constructor) and may be part of the problem.

In any case, looking at the original operator == implementation, the fields are not compared in "natural" order and since && is short-circuiting, it's vaguely possible that the optimizer can't see past the weird order of field access.

Good idea! I tried that and it didn't work unfortunately. I also tried whether the spaceship operator <=> is a viable alternative to generate optimal assembly and unfortunately that's not the case.
And I just realized that C doesn't have native comparisons for structs either.
I've put all of them together into a single comparison: https://godbolt.org/z/5qdKxPq4f
The top row is written in C++ and the bottom one in C.
The left compilation is MSVC and the right one clang.

Independently, it seems like you have a basic correctness problem with the sizeof() based memcmp solution. The sizeof(TextAttribute) is going to be 16 but as far as I can tell only 13 bytes are filled in by explicit field references (unless UNIT_TESTING is defined but still then there's a big alignment hole, the contents of which are uninitialized).

The struct has an alignment of 2 and this PR changes the last member to be 2 bytes large. That way the struct should have a sizeof of 14 with an alignment of 2. I think this should work correctly with memcmp...

I'm trying to find the definitions of TextColor and ExtendedAttributes to understand them better.

TextColor can be found here: https://github.com/microsoft/terminal/blob/main/src/buffer/out/TextColor.h
and ExtendedAttributes here: https://github.com/microsoft/terminal/blob/main/src/inc/conattrs.hpp

TextColor seems nontrivial (given what I saw in the TextAttribute constructor) and may be part of the problem.

I was wondering the same... If I remove the TextColor members from the struct and comparison operators, then the "native" comparison still involves a bunch of jumps apparently.

Ah btw: std::has_unique_object_representations_v<T>, as used in this PR, would return false for any structs that require padding AFAIK.
The description of std::has_unique_object_representations_v is basically: "returns true if every bit in the given type contributes to its uniqueness" and it was added for people writing hash functions, so that they can safely cast T to an array of bytes and hash each byte without worrying about uninitialized padding memory, etc.

Thanks I'll figure out my build problems and tinker with this and have some more concrete recommendations. I used to be quite adept at getting the msvc compiler to generate good code in cases like this, I'm getting weird access denied errors in the build. Is there some forum for asking about problems like this? (I'll hold back from obvious spitballing of possible problems since this is not the right context.)

@EmJayGee Feel free to create an issue or a discussion right here on GitHub, with screenshots or text outputs of the issue you're facing. I'm sure I'm speaking for everyone on the team when I say that we'd be happy to help you set up the project. 🙂

What gives you the impression that the struct/class has an alignment (packing?) of 2? I don't see any packing/alignment indications. I've been away from the code for a while so perhaps the norms have changed here but I would expect 8 without coercion. Small members may be packed within it on smaller boundaries but maybe I lost context somewhere. Is there a projectwide setting or something? That would, in general, be a performance problem since 2-byte alignment, in general, is not performant for most 4 byte and larger objects.
If you have these assumptions, I would definitely encode them in compile time asserts. I see comments on the data members which perhaps are in a format that some linter recognizes but nothing beats the compiler doing the verification itself.
My C++-fu is about 7 years out of date so I need to begin my training over, time to put on the weight vest and enter the gravity chamber.

What gives you the impression that the struct/class has an alignment (packing?) of 2? I don't see any packing/alignment indications.

The first member, _wAttrLegacy, is a uint16_t which has an alignment of 2. The remaining members are chosen in such a way as to make sure that no padding bytes are inserted.
I've added the following static (compile-time) assertions a while ago, ensuring this doesn't get accidentally changed: https://github.com/microsoft/terminal/blob/f5882236dcb8693a0b14c70e4bbe73e6401d844d/src/buffer/out/TextAttribute.cpp#L8-L13
(I've put the assertion in the .cpp file, because the corresponding header gets included in way too many files, leading to unnecessary recompilations on every change. No one had time to clean that up yet unfortunately.)
When we run-length-encode our TextAttribute arrays we pack them into an array of std::pair<TextAttribute, uint16_t> elements, which given the sizeof(TextAttribute) == 14 and alignof(TextAttribute) == 2 results in nice, even 16 byte structures for the RLE compressed array.

I don't know what your portability requirements are but on Windows, the heap allocators will always give you cache line aligned allocations so you'll be good. Well I left before the arm64 stuff became mainstream so I don't know what the deal is there but you're good to go on the intel/amd architectures.
I can do a PR for moving the static asserts to the headers. I'm trying to get my coding legs back especially in this new world of GIT so I'll see what I can whip together for that next week.
Can you point me to where the disassemble the code in situ (binary, what function references the equality operator where we would ideally see an inlined optimized comparison) to see the generated code best? And/or what kind of workload you did to measure the original issue so I can repro it with the current windows perf toolkit tools, see the issue there so I can push the comparison operators around and observe how my changes change things?
Thanks, Mike

Can you point me to where the disassemble the code in situ (binary, what function references the equality operator where we would ideally see an inlined optimized comparison) to see the generated code best?

I'm not sure I understand what you mean... If you're asking were TextAttributes are compared, then it'd primarily be this line as far as I'm aware: https://github.com/microsoft/terminal/blob/f5882236dcb8693a0b14c70e4bbe73e6401d844d/src/renderer/base/renderer.cpp#L828
There you should be able to view the disassembled code.

And/or what kind of workload you did to measure the original issue so I can repro it with the current windows perf toolkit tools, see the issue there so I can push the comparison operators around and observe how my changes change things?

You can use my rainbowbench. It'll draw a rainbow as quickly as possible and tell you the resulting "kcg/s", or in other words how many thousands (k) of colored (c) glyphs (g) it can draw per second (s). Since every character has a unique color, it'll result in every character having a different TextAttribute and thus involve many such comparisons.

@lhecker, sorry I was off doing other things (learning git, github practicing by checking in a trivial build break fix for retail builds) but I'm back now. Your link to rainbowbench leads to a 404 not found. Can you point me to another?
In terms of where to look, I mean like a good function to disassemble to see it inlined. Just going to the equality comparison function in question isn't necessarily particularly interesting since that won't show what the inliner does in context.
So _PaintBufferOutputHelper() is the hot function? Do we have any output from the various perf tools to peruse?

@EmJayGee Sorry, the project was still private. Please try it again! It's a cmake project, but you can also just copy-paste the single main.cpp into your own project. 🙂

Do we have any output from the various perf tools to peruse?

I'm not entirely sure I'm following... If you're asking for a tool with which the perf. impact can be seen then Visual Studio's built-in Performance Profiler is often sufficient.

Thanks, I'll grab it now.
I'm having enough problems getting things building and running, I was hoping you had saved graphs or captured ETLs or whatever the modern equivalent are that I could peruse.
It seems that if I exit VS, delete bin and obj, restart VS, build and then launch, things maybe work so perhaps I'm on a decent path.

I finally got to see generated code and I'm surprised to find that in retail builds, the generated equality comparison is done piecemeal and that the operator== invocation is not inlined. Perhaps it's not inlined because it's so big so let me see what I can do to fix the former.
Here's the invocation...
0:006> u
OpenConsole!operator!=+0x9 [C:\Users\micha\source\repos\terminal\src\renderer\base\renderer.cpp @ 828] [inlined in OpenConsole!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x3d7 [C:\Users\micha\source\repos\terminal\src\renderer\base\renderer.cpp @ 828]]:
**00007ff7`d896bb57 e8c4e2ffff      call    OpenConsole!operator== (00007ff7`d8969e20)**
00007ff7`d896bb5c 84c0            test    al,al
00007ff7`d896bb5e 7409            je      OpenConsole!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x3e9 (00007ff7`d896bb69)
00007ff7`d896bb60 4584d2          test    r10b,r10b
00007ff7`d896bb63 0f8460010000    je      OpenConsole!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x549 (00007ff7`d896bcc9)
00007ff7`d896bb69 f20f11442470    movsd   mmword ptr [rsp+70h],xmm0
00007ff7`d896bb6f 418b431a        mov     eax,dword ptr [r11+1Ah]
00007ff7`d896bb73 89442478        mov     dword ptr [rsp+78h],eax

and here's the operator == code.  I think that should be step 1 and possibly step omega depending on measurements.
0:000> u 00000001`4001bc67
OpenConsole!operator== [C:\Users\micha\source\repos\terminal\src\renderer\base\renderer.cpp @ 833] [inlined in OpenConsole!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x4e7 [C:\Users\micha\source\repos\terminal\src\renderer\base\renderer.cpp @ 833]]:
00000001`4001bc67 0fb644245b      movzx   eax,byte ptr [rsp+5Bh]
00000001`4001bc6c 3844247b        cmp     byte ptr [rsp+7Bh],al
00000001`4001bc70 0f85ac010000    jne     OpenConsole!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x6a2 (00000001`4001be22)
00000001`4001bc76 0fb6442458      movzx   eax,byte ptr [rsp+58h]
00000001`4001bc7b 38442478        cmp     byte ptr [rsp+78h],al
00000001`4001bc7f 0f859d010000    jne     OpenConsole!Microsoft::Console::Render::Renderer::_PaintBufferOutputHelper+0x6a2 (00000001`4001be22)
00000001`4001bc85 0fb6442459      movzx   eax,byte ptr [rsp+59h]
00000001`4001bc8a 38442479        cmp     byte ptr [rsp+79h],al
0:000> u 00000001`4001baeb

... and the memcmp() technique would still have to be done carefully since there is one byte of padding on the end of the struct since the ExtendedAttributes is a BYTE-derived enum but the size of the overall class is 14.
If possible I would just make ExtendedAttributes a WORD-derived enum but that'll probably break too many other things.
I'm prepping a separate PR with just this one change in it that we might agree with since it's super low impact and then we can figure out what else we might want to do.

Okay so I maybe lost the track here a bit between this thread & #12866 - can someone give me a TL;DR? Do we still want this one, or nah?

Do we still want this one, or nah?

This is exactly the way til::rect/size/point - 3 other POD types - are being compared. I'd merge this.

/azp run

@msftbot merge this in 15 minutes


StackExchange.Redis.RedisServerException after Redis server restart

I'm currently running integration tests using "redislabs/redisearch:latest" docker image.
The library i'm using to startup the docker container for Redis is TestContainers-dotnet (https://github.com/testcontainers/testcontainers-dotnet)
At the first test execution, inserting an entity and then updating everything works fine.
After the Redis' docker container is disposed, and restarted, and the second test in the Theory starts, then the UpdateAsync generates the StackExchange.Redis.RedisServerException, with the following message:

StackExchange.Redis.RedisServerException : NOSCRIPT No matching script. Please use EVAL.

Here below the minimal code to replicate the issue.
public class RedisTests
    {

        [Document(StorageType = StorageType.Json, IndexName = "entity-name", Prefixes = new[] { "TestEntities" })]
        public class TestEntity
        {
            [RedisIdField][Indexed] public string Name { get; set; } = String.Empty;
            [Indexed] public bool IsActive { get; set; }
        }

        [Theory]
        [InlineData("Test1")]
        [InlineData("Test2")]
        public async Task TestRedis(string name)
        {
            const string dockerImage = "redislabs/redisearch:latest";
            const string dockerContainerName = "Redis";
            await using var redis = new TestcontainersBuilder<TestcontainersContainer>()
                                            .WithName(dockerContainerName)
                                            .WithImage(dockerImage)
                                            .WithPortBinding(6379, 6379)
                                            .WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(6379))
                                            .Build();
            await redis.StartAsync();
            var redisConnectionProvider = new RedisConnectionProvider($"redis://localhost");
            await redisConnectionProvider.Connection.CreateIndexAsync(typeof(TestEntity));
            var collection = redisConnectionProvider.RedisCollection<TestEntity>();

            var testEntity = new TestEntity
            {
                Name = name,
                IsActive = true,
            };
            await collection.InsertAsync(testEntity);
            testEntity.IsActive = false;
            await collection.UpdateAsync(testEntity);
        }
    }

See #272 already Fixed pending release of 0.4.1 ( will go out in the new year as I don't want to push anything out before going on break)

See #272 already Fixed pending release of 0.4.1 ( will go out in the new year as I don't want to push anything out before going on break)

Thanks a lot! Didn't find it with the search, sorry.

See #272 already Fixed pending release of 0.4.1 ( will go out in the new year as I don't want to push anything out before going on break)

Thanks, this is fixed in 0.4.1


how to improve performance?

I'm trying to split a topic into several, but it seems to me not quite the right solution, to read and write right away? At the moment, if there is one condition, then there is no lag, if there are more than 2 conditions, then the lag grows ....
If you do write to /dev/null, then everything has time to read, even under >5 conditions..
p2 := kgo.AbortingFirstErrPromise(cl2)
fetches.EachPartition(func(p kgo.FetchTopicPartition) {
   p.EachRecord(func(r *kgo.Record) {
      for i := 0; i < len_cond; i++ {
         idx := bytes.Index(r.Value, cond_bytes[i])
         if idx != -1 {
            r.Topic = topicss[i]
            cl2.Produce(ctx, r, p2.Promise())
            break
         } else {
            if i+1 == len_cond {
               r.Topic = topicss[len_topic-1]
               cl2.Produce(ctx, r, p2.Promise())
            }
         }
      }
   })

Hey I'd need to see the consumer side as well. I don't really understand what's going on with len_cond, or really with that function at all.


add appveyor support

no app changes, just windows test support. I suspect i don't need peer review on this one..


fix: append correct homebrew PATH on Darwin

/opt/homebrew should be used on MacOS instead of /opt/linuxbrew

@rriski thanks for the PR! Seems like there's a mixed up there, the linuxbrew being set to use homebrew too 🤣
Can you also fix the Linux part?

@rriski thanks for the PR! Seems like there's a mixed up there, the linuxbrew being set to use homebrew too 🤣 Can you also fix the Linux part?

Ah right! Yeah I'll get that fixed too

I was also thinking of using
if command -q brew
    fish_add_path -am (brew --prefix)/bin (brew --prefix)/sbin
end

but that breaks compatability with fish < 3.6.0 (fish_add_path was added in that version). What do you think?

Problem with fish_add_path is it will be globally configured instead of just the scope of this plugin. Especially when you add the -am flag, I'm afraid it might lead to some unwanted problem.
I'm gonna merge this for now. Feel free to add your reasoning why using fish_add_path is better.
Thanks again for the PR!


set state to LOADING on reload()

https://github.com/facebook/react-native/issues/8239

By analyzing the blame information on this pull request, we identified @nicklockwood and @janicduplessis to be potential reviewers.

Did it work?

@charpeni yes!

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review.

Something went wrong when importing this pull request. Please cc someone from the team at fb to help with importing this.

cc @javache @bestander Import failed.

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review.


Basic Analysis Framework + Elaboration

This PR marks the start of a new analysis implementation. It lives in com.minres.coredsl.analysis and my plan is to eventually replace all of the existing analysis facilities, including the TypeProvider and CoreDslInterpreter.
Even though it is still a draft, the elaboration is mostly functional and can be tested by running the IDE project.
Architecture
All of the analyzers are static classes, meaning they cannot be instantiated and provide their functionality through static methods. Because of this they cannot store any state, which is why they are passed an AnalysisContext or ElaborationContext for every operation.
Analysis Context
Full path: com.minres.coredsl.analysis.AnalysisContext
Replaces: nothing
Reponsibilities:

Holding state of global analysis operations

Elaboration Context
Full path: com.minres.coredsl.analysis.ElaborationContext
Replaces: com.minres.coredsl.interpreter.EvaluationContext
Reponsibilities:

Holding state of per-core analysis operations
Providing an interface through which errors and warnings can be reported

Note: errors should only ever be reported on nodes within the lexical scope of the analysis root

The difference between the analysis context and the elaboration context is that the elaboration context is specific to each elaboration root ISA. Whenever logic inside of an ISA is analyzed, the elaboration context is needed to determine which core definition (or instruction set in case of partial elaboration) is being elaborated. For static analysis that is only performed once instead of for each core, the analysis context is used.
Type Classes
Full path: com.minres.coredsl.type.*
Replaces: com.minres.coredsl.typing.DataType
Reponsibilities:

Representing types of variables within CoreDSL descriptions
Special ErrorType to signal errors during type resolution

ErrorType.invalid - an unrecoverable error occured during type analysis (for example violated type rules)
ErrorType.indeterminate - the type can not be determined because it depends on unassigned constants

Separate classes for type categories
is{*}Type helpers

Constant Value Class
Full path: com.minres.coredsl.analysis.ConstantValue
Replaces: com.minres.coredsl.interpreter.Value
Reponsibilities:

Representing the value of a constant expression
Special constants

ConstantValue.invalid - the expression is not a constant or can not be evaluated
ConstantValue.indeterminate - the expression can not be evaluated because it depends on another unresolved value

Type Provider
Full path: com.minres.coredsl.analysis.CoreDslTypeProvider
Replaces: com.minres.coredsl.typing.TypeProvider
Reponsibilities:

Determining the type specified by TypeSpecifier nodes (getSpecifiedType)
Determining the static type of Expression nodes (not implemented)

Important methods:

CoreDslType getSpecifiedType(ElaborationContext ctx, TypeSpecifier specifier)

Related classes:

ElaborationContext - to look up the type of identifiers
CoreDslConstantExpressionEvaluator - to determine the value of integer size specifiers

Constant Expression Evaluator
Full path: com.minres.coredsl.analysis.CoreDslConstantExpressionEvaluator
Replaces: com.minres.coredsl.interpreter.CoreDslInterpreter
Reponsibilities:

Determining the value of compile-time constant expressions

Important methods:

ConstantValue evaluate(ElaborationContext ctx, Expression expression)

Related classes:

ElaborationContext - to look up the value of ISA constants
CoreDslTypeProvider - to resolve the types used within sizeof and bitsizeof expressions

Elaborator
Full path: com.minres.coredsl.analysis.CoreDslElaborator
Replaces: nothing
Reponsibilities:

Resolving the values and types of ISA constants
Merging constant declarations across instruction sets

Important methods:

ElaborationContext elaborate(AnalysisContext actx, ISA isa)

Related classes:

ElaborationContext - holds state
CoreDslConstantExpressionEvaluator - to determine the value of ISA constants
CoreDslTypeProvider - to determine the type of ISA constants

Analyzer
Full path: com.minres.coredsl.analysis.CoreDslAnalyzer
Replaces: nothing
Reponsibilities:

Tieing together all of the other analyzers (not implemented)
Providing an interface to the outside (not implemented)

@jopperm @eyck
The remaining failing test cases all depend on this file: https://github.com/Minres/RISCV_ISA_CoreDSL/blob/master/RISCVBase.core_desc
The issue is that it declares several aliases, which are not marked as register or extern. All ISA state declarations without an explicit storage class currently default to the storage class param and ISA parameters may not be declared as an alias or array.
I see two ways of handling this issue: Enforcing an explicit storage class specifier or making all alias declarations default to a different storage class. I strongly prefer the first approach. The second one is flawed, because alias-ness is a property of the declarator, while the storage class is a property of the declaration as a whole. So a declaration with both an alias and a non-alias declarator would no longer have a well-defined storage class:
unsigned int x = 5, &alias = PC;

Well, an alias itself does not have a storage class as it is another name for a variable and as such inherits the storage class.

Hmm, the alias thing is interesting. My first hunch also is that we shouldn't have to repeat the storage class on the alias. An alias is a declaration with an ampersand in it, so that should suffice to mark it as an alias, and in consequence, inherit the storage class from the entity it points to.
However, the same reasoning could then also be applied to the type specifier. On the other hand, I wanted to make it possible to change the constness and volatileness of an alias (e.g. to have a read-only alias to some writable entity).

I guess we could sidestep the alias issue by not allowing mixed declarations. The we could introduce a new alias storage class and in case no explicit storage class is specified, we default to either param or alias depending on the declarators.

Ready for review. @jopperm Could you please add the table from https://github.com/Minres/CoreDSL/pull/59#discussion_r973708842 or a variation thereof to the spec?
Also I have no clue why the CI is failing. All tests are successful on my end. The errors reported by the pipeline are complete nonsense and refer to line numbers that don't even exist.

The ProxyMessageAcceptor class is used to automatically report errors in the correct place. If during elaboration if a core, an issue is reported within a provided instruction set, the proxy acceptor will report that issue on the core's name token. It also prevents us from accidentally reporting issues in other source files, which would cause the validator to crash.

Well, the gradle test reports about the Java lines but you are looking at the xtend sources therefore they don't match.

@jopperm Could you please add the table from #59 (comment) or a variation thereof to the spec?

Will do!

Done: diff

I also made the change that only parameter declaration are merged: diff


Add the result counts to the Browser Toolbar and should open Sidebar on click instead of opening Settings

Addressed in #176


4.0.1 update broke molecule

Hi,
As @john-bailey report yesterday here : https://github.com/ansible/ansible-compat/discussions/257
This update broke molecule.
We have to downgrade back to 3.0.2.
I have today the same issue of @john-bailey  and the same downgrade work.
I take this issue here because perhaps commentary is not the best place to report an issue.
Thanks for you're work

FYI: This update broke Molecule, and I had to downgrade back to 3.0.2 Here's the traceback
Traceback (most recent call last):
  File "/apps/ansible_test/.venv/bin/molecule", line 8, in <module>
    sys.exit(main())
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/molecule/command/init/role.py", line 174, in role
    r.execute()
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/molecule/command/init/role.py", line 84, in execute
    result = util.run_command(cmd)
  File "/apps/ansible_test/.venv/lib64/python3.9/site-packages/molecule/util.py", line 149, in run_command
    result = app.runtime.exec(
AttributeError: 'Runtime' object has no attribute 'exec'

That is not a bug in ansible-compat, if you have installed molecule[lock], you would not have reached this case, where a newer version of a dependency would break the tool.
There is nothing possible to fix on ansible-compat side, only on consumers, avoiding using incompatible version or switching to the new version.


Add "dictionary" types to Inlet

Summary

This PR is a feature
It does the following:

Adds the ability to defined string-keyed (in addition to integer-keyed) associative arrays in an input file

This required more refactoring/additional code than I expected as it doesn't look like Sidre/conduit supports arrays of strings within a single sidre::View.  Key storage is still implemented as a contiguous integer array for arrays, but dicts use a group of string-valued sidre::Views.

If I understand it correctly, the code does not currently support having integer-indexed and string-indexed entries in the same table, but this might be supported in the future. Is that right?

Yes - I've logged this as #400 so we don't forget.


Manual z index

These small additions are probably much cleaner than my other approach of removing the outer div entirely.

Closing because I can't figure out how to manage the conflicts online, will try again locally.

Actually let's just proceed with the new branch, I'll copy-paste my comments from the old pull request in a new one.


Docker Desktop Crashes on CLI Click

Docker Desktop 4.7.0 (77141). Any container. Clicking the CLI option crashes app immediate. I have re-set to factory default and created 1 container with the same failed result. Host system is Window 11.

This is the wrong repo to report this issue. please open an issue on docker/github-feedback


Possible to use Imgui GUI system in 3D Gui?

Wonder if this Imgui could be used in 3D Gui?

Dear ImGui is not really intended to be used as a GUI for players (it has very limited support for custom themes), so this isn't something I've thought about.
If this is a feature you want, I can look into it, but generally I think Godot's own GUI system would be a better fit for 3D environments.


Browserify example returns "Uncaught TypeError: undefined is not a function :5811"

The line that chrome complains about:
content = fs.readFileSync(file, 'ascii'),

In this function:
/**
 * Load an Apache2-style ".types" file
 *
 * This may be called multiple times (it's expected).  Where files declare
 * overlapping types/extensions, the last file wins.
 *
 * @param file (String) path of file to load.
 */
Mime.prototype.load = function(file) {

  this._loading = file;
  // Read file and split into lines
  var map = {},
      content = fs.readFileSync(file, 'ascii'),
      lines = content.split(/[\r\n]+/);

1

Any work-arounds for this?

You need to update your Request dependency, c.f. this bug https://github.com/request/request/issues/455
Request was using mime package which was incompatible with browserify, and switched over mime-types instead.
You should be bumping it to "request": "~2.51.0" at least.


Purgecss stripping out 3rd party library styles

When trying to use purgecss-webpack-plugin in my app it extracts all the css for any 3rd party plugin loaded such as jqueryui or tinyMCE. The page specific css is fine. My webpack config is :
  new PurgecssPlugin({
     paths: glob.sync([
       path.join(__dirname, 'Views/**/*.cshtml'),
       path.join(__dirname, 'src/app/**/*.js'),
       path.join(__dirname, 'src/app/**.ts'),
     ]),
     extractors: [
       {
         extractor: class {
           static extract(content) {
             return content.match(/[A-z0-9-:\/]+/g) || []
           }
         },
         extensions: ['cshtml', 'js', 'ts']
       }
     ],
}),

I am using
webpack 4,
<EMAIL_ADDRESS>Any ideas?
Many thanks

Thanks for that jsnanigans,
Does that mean that i have to whitelist all 3rd party plugin elements that i am using as that would be a pretty huge list?
When using PurifyCss in webpack 3 it was able to do this automatically though seems to have broken when upgrading to webpack 4.
Isn't this the point of using something like Purgecss? to strip out unnecessary css form libraries like bootstrap?

when using webpack you need to use npm i purgecss-webpack-plugin@next -D to install the next channel.
The point of purgecss is to strip out unused css, however purgecss can not magically know what css you are actually using (at the moment), so you need to give it some html or templates from where purgecss extracts selectors that are possibly used, if there is a library that dynamically adds html, that is not in your original templates, you need to either add the JS file that generates the html but this approach does not work if the styles are created dynamically in the JS since purgecss does not run the JS (at the moment), the other option is just to keep all css selectors that start with, for example, mceu. when using bootstap you actually add the classes in your html so then purgecss knows which classes you used and removes the rest.
So you only need to whitelist third party plugins that add html dynamically, like tinyMCE, if you are using a lightbox plugin that appends some html automatically youll have to add that too.. but for bootstrap, bulma, pure, foundation and most other ui kits you don't have to whitelist anything although you might have to use a special extractor for some.
Hope that helps, let me know if you have any other issues :)

FYI, the newest version 1.2.0 supports both webpack 4 and 3 so please, if you are on the next channel, install 1.2.0

I'd like to ask a question related to this issue.
You said purgecss can not magically know what css you are actually using.
Wouldn't this be possible by extracting keywords from the generated bundle instead of extracting theme from the source files?
This way it would take into account the libraries that I am effectively using and their own css.
(I'm using semantic ui for React and when I use the component Container, the underlying one uses the class .ui.container which isn't picked up by purgecss since it's not inside my own source code.
Since this is a webpack plugin, it could run after webpack has generated the final bundles. Those bundles certainly use tree shaking which guarantees that only the React components I effectively use are included. This would, in turn, allow us to extract keywords regardless of dependencies.
But, to do this, purgecss should be able to take direct content as input ; as opposed to taking paths.
What about that, does it seem feasible? Did I miss something?
/cc @jsnanigans @Ffloriel


Document or simplify the tooling for staticrequired

Hi,
https://github.com/drud/ddev/blob/master/docs/developers/building-contributing.md does list make staticrequired as one of the building steps.
But to run it (to build the Go app) you first will need to install markdownlint (which is actually a markdownlint-cli npm package) and mkdocs (which is a python package that can be installed through pip).
I do see 2 problems here:

It is not documented and not hinted during make staticrequired. It just break with an error message and forces you to google for this tools
If you don't have node installed on your machine, you will have to install it to get markdownlint-cli through npm to build Go, which does feel like unneeded overhead.

Either this should be documented or the tools should be put into the build container.

#2254 pushes all this into the golang-build-container. Thanks for pointing this out! When you're the only one that works on these things most of the time you don't necessarily notice these things.


fix: fixed ui for toggle theme button #1 and improved ui overall and for dark theme #2

#1
Before:

After:

#2
Before:

After:

@hgjajoo Your pull request has been successfully merged! Don't stop here—continue contributing by addressing more issues and aiming to become a top contributor. Exclusive swag awaits for those who go the extra mile!
Great contribution to GSSOC'24 EXTENDED! 🎉


feat: :sparkles: Multi sig wallet testing.

Description
Concise description of proposed changes, We recommend using screenshots and videos for better description
Additional Information

[ ] I have read the contributing docs (if this is your first contribution)
[ ] This is not a duplicate of any existing pull request

Related Issues
Closes #{issue number}
Note: If your changes are small and straightforward, you may skip the creation of an issue beforehand and remove this section. However, for medium-to-large changes, it is recommended to have an open issue for discussion and approval prior to submitting a pull request.
Your ENS/address:

You probably wanted to PR against your repo, and not the main SE-2!

ohhh!!! sorry!!! xD


added unit test for ShowerMaxEstimator

requested changes implemented

Still have an error in Travis:
FileNotFoundError: [Errno 2] No such file or directory: '/home/travis/build/cta-observatory/ctapipe/ctapipe-extra/datasets/atmprof_paranal.dat'

Which I guess means the ctapipe-extra pointer needs to be updated as well to a new version of that repo?

@MaxNoe ?


v1.0.1 was not published to the meteor package repository (atmosphere)

+1

:heavy_check_mark:

What about 1.1.1?


Improve swagger-router controller error handling.

Changes to swagger-router to add additional logging when a require() on a controller module fails:

Always logs to console if present, since this error is fatal.
Additionally log to debug() with same message to allow any debug message sinks to continue to operate and track error too.

I deliberately re-throw the error so as not to change the control flow. Today the error just goes straight to the top of the stack, this continues the behaviour, but at least gives a reason why.
-Steve

The failures in the build are timeout related in code that's not been touched. I suspect it's the kind of thing re-running clears?

Correct.  Travis CI is slow sometimes, as is the CDN we use for files.  Don't sweat it.  When I get back to my laptop, I'll review and merge.

Do you mind squashing the commits?  Minor nit but useful in the long run.

Squashed.

<EMAIL_ADDRESS>is released with enhancements related to this.  While we still only pass an Error to the callback during testing, we now will log all errors that happen during initialization even if you're not using DEBUG.


[REPOSITORY] create new repository

Hey there, sorry it took us a long time to review this simple matter.
There's something I don't get, why did you name the new function 'post_repository' but you are using "client.create_repository". We would rather have it named create repository. Please update the name of the function on your pull request and I'll  get it merge asap.
Thanks for contributing!


Add 'externalConsole' launch option

With this checkin, we now support an 'externalConsole' launch option.
This option is specified by default for console projects.
This completes the fix for:
https://github.com/OmniSharp/omnisharp-vscode/issues/175

:+1:

👍


raidboss: DSR Wyrmsbreath 2 Boiling and Freezing

The second Wyrmsbreath in phase 6 utilizes Boiling and Freezing debuffs. I am not sure if it's possible to get these debuffs by failing the first Wyrmsbreath, but the debuffs do not appear in a kill log at that time that I looked at and so I did not think to add a check for that.
This also brings back Deep Freeze and Pyretic debuffs from old. Deep Freeze looks to be unavoidable, but Pyretic will require an advance notice such that the player is not moving when Boiling expires as there is a brief period of time between Cauterize hit and Boiling expiration where Pyretic is on the player.
I am not certain on the exact timing of when the dragons are in position, but it looks like it's at least random left/right which dragon is where and I am not sure if the cardinal they choose is also random. Position could be done either with Cauterize cast position and collection trigger or modifying this trigger with OverlayHandler in the future which I think the dragons may jump to position prior to starting the cast.

Does this also occur in the first wyrmsbreath too? Should it be suppressed there somehow?

Does this also occur in the first wyrmsbreath too? Should it be suppressed there somehow?
I looked at quite a few 12:30 wipes during this phase and do not see these debuffs in the first wyrmsbreath. None of the kill logs have it during the first one, so it looks like they only happen in the 2nd.


added Hospital Management System in C

Title and Issue number

Close #<issue_no>

Checklist:

[] I have mentioned the issue number in my Pull Request.
[] I have commented my code, particularly in hard-to-understand areas
[] I have created a helpful and easy to understand README.md

First raise an issue and get it assigned under hacktoberfest'22

Closing as part of Hacktoberfest 2021 and now outdated.


[Machine Learning] Using Mask-RCNN and the PixelLib library to perform Instance Segmentation

Proposal Submission
Proposed title of article
Your title should be descriptive of the article/tutorial. Be Specific.
Use keyword research to improve your article's SEO.
Using Mask-RCNN and the PixelLib library to perform Instance Segmentation
Proposed article introduction
We're looking for the first 2-3 paragraphs of your article that appropriately summarize what your article will be about.
We will use this writing snippet to help us assess the overall quality before approval so ensure it has been proofread, spellchecked and grammarchecked.
Pixellib is a library for performing segmentation of objects in images and videos. It supports the two major types of image segmentation, namely; Semantic segmentation and Instance segmentation. This tutorial will discuss about Instance Segmentation using a model called Mask-RCNN. With this model, you will be able to segment yourself from other objects within a frame. We will be performing this using the OpenCV library, PixelLib library, and Python.
Key takeaways
What are the 3-5 most important things the reader should understand or be able to do after reading this article?
Use this area to get your ideas down on the bulk of your article or tutorial.
By the end of this tutorial, a reader will be able to understand:

What is the PixelLib library.
How to install the PixelLib library using Python
How to use OpenCV to capture our frames in real-time.
How to apply Mask-RCNN to be able to segment our image.

Article quality
How is your article unique? Tell us what makes your approach different from similar articles that have published on the same topic?
Is yours more in-depth? Does it cover additional topics? Do you provide handy tips or anecdotal advice?
References
Please list links to any published content/research that you intend to use to support/guide this article.

PixelLib

Hi @smkinyan
Thank you for your submission.
However, you didn't indicate how article your was going to be unique. After a google search of your article topic. I discovered articles and Youtube videos covering the same. We typically refrain from content that is widely covered on the web as we focus more on original content.
Feel free to explore other options and topics.


Support for tagless components?

I think it would be a nice addition to support tagless components:
export default Ember.Component.extend({
  tagName: '',
});

This must have been added right before I clicked the "Watch" button for the repo, sorry for the late response!
@FezVrasta do you mean targeting a tagless component, passing a tagless component into an {{#ember-popper}}, or something else?

@FezVrasta just wanted to send a ping to hear your thoughts

Sorry, I simply forwarded a request I got on my repository. I don't use Ember so I can't be much of a help...

heh no worries.
I think our hands are a bit tied with targeting tagless components, since popper.js needs an element to target.
One can currently pass in a tagless component as the popper's content, though it will be automatically wrapped to give popper.js something to target.
Going to close this out for now, though happy to hear specific requests from people if there is a pattern they'd like to see enabled.


Remove node-sass dependency

I propose we should find another way of handling [css|sass|scss] until node-sass switches from using Gaze as their file watcher.
I love Docker, I love Mac, I love react-scripts, but they don't work together.
I re-fitted my app to look like "out of the box" create-react-app only to find out that Gaze on node-sass causes my com.docker.hyperkit to burn my CPU at 350%..
node-sass --watch doesn't work in docker/for-mac without burning the CPU.
For node-sass there has been a PR to switch to chokidar but I don't think the maintainers are interested as the PR has been open for a little over 2 years.
Thoughts?

I'm open to any other solutions that don't involve react-scripts adding dependencies on anything related to Sass.

I'm sure the community as a whole would appreciate someone who might write a package which acts as a thin layer on top of node-sass.
Said package simply uses chokidar for watching and compiling via one-offs with node-sass.

Let me see what I can come up with. A very thin layer for our use-case shouldn't be bad.
Let me know if there are any requests or requirements. I am more of a Python person but know js relatively well. I'll report back with something if someone wouldn't mind offering feedback then.

https://github.com/michaelwayman/node-sass-chokidar
I switched my watch css scripts to
"scripts": {
  ...
  "build-css": "node-sass-chokidar src/ -o src/",
  "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive"
}

it fixed a recursive compile issue that was forcing me to restart sometimes.
Second, it fixes "Note that node-sass seems to have an issue recognizing newly created files on some systems so you might need to restart the watcher when you create a file until it’s resolved."
it brought my CPU usage down from "idling" at 150% to a nice quite 6%.

I'm gunna write some tests tomorrow, do some cleaning, and throw it on NPM tomorrow.
Think it would be possible to switch to switch to this instead of node-sass? That would be awesome, I'd really like to be the one to open the PR for it if possible :)

Looking good!
And of course, if all is working well we will happily accept a PR updating our documentation to suggest your package instead. :)

Until node-sass solved the issue of newly created files, we can use chokidar cli tool instead of using watch option of node-sass. I did this and it's working correctly.
scripts": {
    "build:css": "node-sass src/ -o src/",
    "watch:css": "chokidar 'src/**/*.scss' -c 'node-sass src/ -o src/ --recursive'",
    "start:js": "react-scripts start",
    "build:js": "react-scripts build",
    "start": "npm-run-all -p build:css watch:css start:js",
    "build": "npm-run-all -p build:css build:js",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }

that's not bad @eashish93 but it isn't suited for larger projects with a lot scss files (especially when those files are mounted in shared volumes)
One of the benefits of using chokidar directly is that you only need to re-compile the files that need it (the changed file and its ancestors importing it).
You're approach definitely works but it will take just a little-too-long in my particular project.

@michaelwayman. I am using chokidar cli tool directly in the script. See the second npm script watch:css.

I see what you are doing and it definitely works, it probably works like a charm for a good number of projects.
I don't want to get too off-topic but,
node-sass does something slightly clever with its --watch option. It creates a dependency graph from the watched files and only re-compiles the changed scss file and its dependents.
node-sass src/ -o src/ --recursive will re-compile all the files whether they need it or not.
when you have a lot of scss files in a shared volume recompiling every scss file on save takes a long time. The dependency graph is the difference between compiling 200+ files vs compiling 1-2.

Also this https://github.com/facebookincubator/create-react-app/issues/1939#issuecomment-292774076 the proposed solution should only watch *.scss files to avoid infinite recompiling.

https://www.npmjs.com/package/node-sass-chokidar
All the original node-sass cli tests are passing with node-sass-chokidar on travis-ci.
The workarounds I've seen so far has been to run docker inside a vagrant box to "disguise" the problem, or to replace node-sass with a ruby package.
I would like to open a PR to the README to let people know about this option if it's alright?
In the meantime you can probably close this issue, I may reference it in my PR though if everything is still kosher.

@michaelwayman I like your module because it's simple to consume and understand what's going on. Are you going to open that PR? 😄

Opened the PR.
https://github.com/facebookincubator/create-react-app/pull/1987
I am a native english speaker but terrible technical writer, let me know if my verbiage is off.
Thanks for the opportunity to contribute ;)


Remove duplicate openblas entry

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


CC1101

hi,
is it working with a CC1101 also?
regards

What is "CC1101"? Provide reference and more detailed questions than just a one-liner.

oh i'm sorry, thought it was known.
Its a transreceiver used in conjunction with the raspberry and homegear (https://www.homegear.eu/index.php/Main_Page) or fhem (https://fhem.de/) to control homematic devices.
it could be seen as an alternative to the ccu2.
but as it is working like a charm i thought it must be possible to use the same transreceiver with raspberryMatic.
i want to try a hom.ee (https://hom.ee), it connects to the ccu2, but i don't want to buy a ccu2 so i thought i could use my raspberrypi with my CC1101 and raspberryMatic, is this possible?

No, this is not possible ATM. RaspberryMatic and its internal processes are expecting RF modules that are compatible to the eQ3 hardware the CCU2 is using itself. So either you use a "HM-MOD-RPI-PCB" or "HM-LGW-O-TW-W-EU" to connect to your homematic devices.


Add submit_url field to requestToken responses, clarify HS's can send tokens themselves

The spec implementation of MSC2078.

Odd that the added section has an increase line spacing height. Is this due to having multiple paragraphs perhaps?

I wouldn't worry too much about the line height tbh - it's almost certainly because of the paragraphs, but I think we can fix that with css on Monday if we care (I don't, at least not enough to rush in a fix).

@dbkr could you be an identity person and check this PR for accuracy?

Thanks for sticking with me on it! I've requested a final review from @dbkr as an 'identity person'.

also may be a good idea to add a few red flags to the impl proof just in case someone copies it with the vuln.

have added yelling to the PR description of https://github.com/matrix-org/synapse/pull/5377


Add kmap support

I think I worked everything out except:
Did not add d-presence support yet.
Used Set instead of RowSet. I currently have some places where I build the Subset dynamically (e.g. createPartitionsByClass) and do not know beforehand how big the data associated with the subset is. RowSet seems to demand that information at creation.
And when merging the indices so far it helped me getting all indices from the Set. I don't know how to do that for a RowSet yet.


As a student financial advisor, I can delete a lead so that I can keep my list of leads up to date.

Resolved by https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/76.


Stop Auto-Renaming of Input/Output Structures

Smithy allows the definition of operations without associated input or output structures. However, adding these structures is considered a backward-compatible change according to the specifications. When generating a Smithy client, the API call for the operation requires a parameter that represents the operation's input as defined in the model. Since adding an input to an operation is intended to be a backward-compatible change (Smtihy Specs), any modifications to the model would necessitate changes in the user code that invokes the generated code, if it previously did not require a structure. This is why the client always generates input/output structures, even if they are not defined in the model. The code generator names these by suffixing "Input" or "Output" to the name of the operation. To maintain consistency, for cases where the operation defines an input or output structure, it renames them to match the same naming convention: the input structure will be called OperationNameInput, and the output structure will be called OperationNameOutput.
On the server side, however, when such changes are implemented, the server must process the request differently, and the corresponding code must be updated. This requirement is nearly a mandatory aspect of the specification for servers. The server follows the same convention as the client in that it also renames input/output structures. However, this causes confusion for service authors. Additionally, when we implement a plugin that will allow users to generate Rust structures (Issue #:1370) only from a model without generating service code, we would need to allow them to name the structures whatever they want and not rename them.
This issue is to stop renaming these input/output structures on the server side.
Note: This will be a breaking change.

However, adding these structures is considered a backward-compatible change according to the specifications.

It looks like this is not the case. It's a breaking change from Smithy's perspective too: https://github.com/smithy-lang/smithy/issues/2253#issuecomment-2069943344
It looks like clients only rename operation input/output shapes for consistency.

By unconditionally suffixing with Input/Output, we're also not honoring $operationInputSuffix/$operationOutputSuffix, which were added in IDL v2: https://smithy.io/2.0/spec/idl.html#control-section


possible bug? adding a new address to the magic sock will remove connections made to us

We only prune endpoints after a call to set_network_map. In that method, we overwrite the internal MagicSock::netmap & remove any MagicSock::peer_map Endpoints that are not present in the latest netmap.
This removes any connection information about nodes that have connected to us in the wild.
We may very well want to prune these connections in this way.
However, we use set_network_map to add new addresses explicitly to the MagicSock / MagicEndpoint (using MagicEndpoint::add_known_addr). This means anytime we add a new address, we are pruning any "natural" connections made. This seems like an unintended side effect, I don't think a user would expect that any time they add an explicit connection, they are potentially closing connections to other (potentially active) nodes.

We should change the data flow so that MagicEndpoint::add_known_addr sends a message with the peer info to the actor, and does not fully replace the netmap.

@Frando so can this be closed now or is #1447 not the whole story?

I would guess but am not sure, maybe @ramfox can confirm that the situation that triggered this issue does not occur anymore.

closed by #1447 !


Add a C++ implementation of the PN532TokenProvider

Signed-off-by: Kai-Uwe Hermann<EMAIL_ADDRESS>

I guess, this could be now refactored, using the evSerial from the framework, right? Concerning the low-level code, there are quite a lot of constants / magic numbers which could be cleaned up. I would also advise to use packed structs if possible, to decode the messages. Is the heavy use of promises, shared ptrs, dynamic casts really necessary?

I'd merge it like this and then apply the general serial/date/threads PR afterwards


Removing resolved known limitations from 21.2 doc

Fixes #12137

This change is

Handling each change in a separate PR to help avoid merge conflicts with others working on this file.


docs: improve README.md

README.md is the file newcomers see when they first visit the module's repository or NPM page. Currently, it gives absolutely no information about how the module works. This pull request aims to improve by adding information about features, setup and basic usage of this module.

I like the changes. Thanks. :)

Thank you.


Seemingly excessive permissions

Why does it need to communicate with any local network or internet machine in the chromeos app?

This project is actually for the Chrome extension, not the Chrome OS app.
But the Chrome OS app needs those permissions to publish a post (and interact with published posts) on https://write.as. Otherwise everything happens locally -- there's no communication with the internet. Feel free to email me at<EMAIL_ADDRESS>if you have more questions.


Single choice, unselect the answer option on click.

Describe the bug
A clear and concise description of what the bug is.

Currently, in single choice view if selected answer option get clicked, it does not get unselected.

To Reproduce
Expected behavior

If selected answer option is clicked then it sould be shown as unselected answer option.

Screenshots
Smartphone (please complete the following information):

Device: [e.g. Samsung Galaxy A2 emulator]
Android version: [e.g. Settings -> About phone -> Android version]
Build number: [e.g. Settings -> About phone -> Build number]
Version [e.g. 24]

Additional context

Incorrect project.


How to the Client detect screen sharing end on iOS???

hi @muaz-khan !
Please help me this issues!
I open() function on Chrome Desktop. I using The device iOS join() function. When i stop share Screen. But event onstreamended not work on iOS.
Please help me how I can fix it? Thanks!

use Leave event instead of onstreamended event it will defiantly work.


[#1909] Add units to item weight & properly convert for calculating encumbrance

Item weights now define a specific unit which will make it possible to have a mixture of imperial and metric object weights, as well as represent large items in vehicle inventories. Defines these weights along with a conversion method in CONFIG.weightUnits.
To Do

[ ] Convert SRD items

@arbron do you think the same concept can make sense for meters and feet as well ?

fixes #1237

@arbron Does this PR enable changing the units of measurement of vehicles? I don't think having tons as the only unit of measurement really makes sense for dnd5e vehicles.

Going to try to get this and #3415 in 3.2 as I understand the encumbrance levels are causing some disruption for metric users. If I understand the gist of this PR, it's similar to how we added units to currency, but for weight now too?
The new sheets at the moment simply use an icon to represent weight, rather than a unit, and I'd prefer to keep it that way as I think it's a bit easier to parse visually. Is it reasonable to assume users won't be mixing and matching items with different weights on their sheets? Or is this likely to become a point of confusion?

Mixing lb and kg would be strange to do (in my opinion). But if it ends up being allowed, a simple tooltip could be added on the weight of the item on the actor sheet.

Yeah, a tooltip would be no problem

Just to comment on the megagrams point and suggested alternative:
According to convention (compare: https://en.wikipedia.org/wiki/Metric_prefix) mg would stand for miligrams while megagrams (which I have never heard uses before) would be Mg (note the case). I would also like to note that tons vs tonnes for metric vs imperial seems rather confusing to me when it could simply be Imperial tons vs Metric tons for perfect clarity. The latter point is especially noteworthy for people for whom English is not their first language and therefore aren't familiar with the spelling difference's meaning.


Checkbox-group validation error getting triggered on load.

Describe the bug
Checkbox-group validation error getting triggered on load.
Tested on shidoka-application: 1.1.11

Stackblitz url: https://stackblitz.com/edit/yfh6gh
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

:tada: This issue has been resolved in version 1.1.12 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


window is not defined error on ssr

I'm running this sdk on NuxtJs, it's all ok when running client-side, but when I call:
"const {api, apolloClient} = await ctx.$saleorManager.connect(saleorAPI => {});" On server-side rendering, I get the "window is not defined" error.
The need of ssr is for SEO, so the search engines will index my products pages.
I thank in advance for the efforts to solve this!

Thank you for the bug report. In the last days we have fixed the missing window in https://github.com/mirumee/saleor-sdk/pull/49, and released new version already. Please check it out.


add chunkin rule

This was necessary for me to avoid the HTTP 411 errors, as mentioned in https://github.com/docker/docker/issues/1486. Just having the chunked_transfer_encoding on; rule wasn't sufficient.
Note that you probably shouldn't merge this before checking that nginx-ssl-secure's nginx parent supports these rules. I am workin on ARM, so I have my own nginx parent image that installs nginx from the Debian repositories as nginx-extras.

hi,
thanks for working this out.
how do i know if the official _/nginx is ready for this merge?
Thank you
Marvin

I tried it now on an amd64 architecture with your untouched nginx-secure-ssl image based on the _/nginx parent image and it doesn't seem to support it.
2015/05/03 16:20:14 [emerg] 1#1: unknown directive "chunkin" in /etc/nginx/conf.d/docker-registry.conf:26
nginx: [emerg] unknown directive "chunkin" in /etc/nginx/conf.d/docker-registry.conf:26

The official _/nginx Docker image seems to be using the Nginx Inc. Debian packages which do not have this light, full, extra version division. When I tried this Dockerfile with nginx-ssl-secure built from the Debian's nginx-full, I also got the same errors and the solution was to switch to nginx-extra. I don't know how to solve it for the Nginx Inc. package, though.

OK, I had to set up the registry on an amd64 server and it actually works there with your original version, so this pull request shouldn't be merged for the normal case. It seems this only helps my particular initial ARM deployment, where I have to use the Debian nginx package. I think that this can be closed then.


PWN-3084 - Receiving a push messages inside the app

Jira Ticket (Mandatory)
https://p2pvalidator.atlassian.net/browse/PWN3084
Description of Work (Mandatory)

PWN-3111 - FCM integration
PWN-3113 - FCM push: UI implementation
PWN-3112 - NotificationService integration
PWN-3114 - Device token send retry

@1sakov how should I name this PR and branch?


Latent metric anomaly detection

This was work in most part performed by @fcraighero while at IBM Research Zurich. It implements three algorithms for epistemic uncertainty estimation/anomaly detection based on proxies for data density in the latent space of neural networks.
It provides the following new posthocUQ methods:

uq360.algorithms.layer_scoring.knn.KNN
uq360.algorithms.layer_scoring.aklpe.AKLPE
uq360.algorithms.layer_scoring.mahalanobis.Mahalanobis

The first two methods are based on k-Nearest-Neighbor searches, for which we provide three solutions

uq360.utils.transformers.nearest_neighbors.exact.ExactNearestNeighbors based on sklearn
uq360.utils.transformers.nearest_neighbors.pynndescent.PyNNDNearestNeighbors based on pynndescent
uq360.utils.transformers.nearest_neighbors.faiss.FAISSNearestNeighbors based on faiss

Still TODO: implementing tests (code has been checked of course though). Opening this PR to allow discussions.

This is looking great!
The travis build failures should be fixed after merging the latest main branch.
Also, when you add tests, you could add the additional dependencies to .travis.yml as a temporary fix so that travis can run those tests.

I opened #25 with signed-off commits  but the same content. I'm closing this


mopidy-tunein: init at 1.0.0

Motivation for this change
TuneIn integration for mopidy.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

This has been working at my dads place for over three weeks, so I think it's fine.


[IBCDPE-541] & [IBCDPE-544] Process, Stage and Execute Workflow on HTAN Immune Subtype Clustering Data

This PR adds the first scripts to this repository in a project-specific directory: immune_subtype_clustering/.
I decided to include the code to cover AC for both IBCDPE-541 and IBCDPE-544 because the latter depends so heavily on the logic in prepare_data_sheet.py, a full test of preparing the data, staging it, and running the CWL workflow is the only way to be sure that the whole process works.
IBCDPE-541
The first is immune_subtype_clustering/prepare_data_sheet.py which combines all of the TSV files within a Synapse folder into a single sheet which can be fed into the Immune Subtype Clustering CWL workflow. The data sheet is then re-uploaded to Synapse.
The second is immune_subtype_clustering/nf_stage.py, which stages the above-created data sheet, and .json configuration file from Synapse to S3 for a Nextflow Tower run. It leverages py-orca and nf-synstage.
IBCDPE-544
The third is immune_subtype_clustering/nf_launch.py which takes the output of the nf-synstage run along with the CWL file for the workflow we are running and executes the workflow on the prepared data.

@thomasyu888 I implemented a bunch of changes including adding a script for executing the workflow. I am testing the whole process in order now.

Using these scripts I was able to successfully do the data sheet preparation, stage the data, and run the Immune Subtyping workflow.


Touch up video player UI

Edit per our discord chat

[ ] Move buttons to top
[ ]  Put background behind buttons
[x] Move time elapsed indicator into scrubber
[x] Put play/pause button in screen center
[x] Animate the size of the scrubber thumb when scrubbing (default to small)
[x] Make the scrubber track a bit thinner
[x] Minimized volume bar

@colejd

I'm going to redesign the progress bar to more or less match how it looks in the Music app. Not colorwise though. I'm going to make the bar thinner and the thumb very small, but it'll animate to be larger when the user interacts with it. I'll also be relocating the time remaining label and making a time elapsed label to match it.

@ccrama We should add a minimized volume bar too! https://github.com/andreamazz/SubtleVolume

I am not convinced of item 1 or 2 anymore, I think the new implementation is pretty much done (except possibly making it closer to the bottom especially on rotation)

Done and done!


Set browserslist correctly

A correct browserslist must be defined in order to let PostCSS (already running with Vue CLI) prefix the code. I have a PR ready, i can suggest browsers version where the grid module is natively supported:
[
  "last 2 Chrome versions",
  "last 2 Firefox versions",
  "last 2 Safari versions",
  "last 2 Edge versions"
]

Then remove prefixed code around the repo.

Sure, sounds good to me. Please don't remove the prefixes from the gradients, I don't mind them going back further.

If you set autoprefixer it will add them if required based on the above browsers compatibility list. Why keeping them?

Because the gradient prefixes goes back farther than the browserlist you compiled, and I want to keep that.


Add database cleaner for testing

https://trello.com/c/Vbwd7cye/68-allow-sending-news-to-publishing-api-m
This stops the test database filling up with data, which was making the
Capybara page diffs (even) more difficult to read when a feature test
fails. I've left the default strategy (transaction) as-is on the basis
that my tests continue to run fast locally.

They might do, but in general it's a bit weird if the test database is full of unused data that's never cleaned up.

@benthorner yeah I thought by default activerecord tests run in a transaction so they don't commit to the database meaning you don't get stuff left and don't need database cleaner. I could be wrong though and/or may not apply to feature tests. From googling use_transactional_tests seems to be the option

Ah yes, I thought Tijmen mentioned something about that but assumed we'd turned it on already. Closing in favour of #42.


Remove default ports

Example: http://myhost.com:80/swagger/docs/v1
The :80 is not required, so it should be removed. Same for 443 on https.

Duplicate of #411


Help Menu

Game can be confusing to the user.

Can this issue be closed? @dborg291

Along with the other issues that reference this issue

Help Menu has been fully implemented. From merge #304. Closing this issue (#277) as well as duplicate issues #278 and #281.

Help Menu has been fully implemented. From merge #304. Closing this issue (#277) as well as duplicate issues #278 and #281.


CML Template suggestions

I don't know to what extend these are customizable or debatable, but after knocking out a few more CFML translations, I'd like to recommend a few changes to the defaults that load when starting a new translation.  This is just for consistency and to reduce as much copy paste as possible
Default Solution
component {

    function fnName( numeric n ){
        return n;
    }

}

Default Solution Setup
component {

    function fnName(){
        // Your code here...
    }

}

Default Test Cases
// https://testbox.ortusbooks.com/
component extends="CodewarsBaseSpec" {
    // Submitted solution is written to Solution.cfc
    function beforeAll(){
        SUT = createObject( 'Solution' );
    }

    function run(){
        given( "Example", () => {

            when( "Basic tests", () => {
                then( "Input of 42", () => expect( SUT.fnName( 42 ) ).toBe( 42 ) );
                then( "Input of 3.14", () => expect( SUT.fnName( 3.14 ) ).toBe( 3.14 ) );
            });

            when( "Random tests", () => {
                then( "with random data", () => {
                    loop from=1 to=500 index='local.i' {
                        var n = randRange( 1, 5 );
                        expect( SUT.fnName( n ) ).toBe( fnNameRef( s ), "Input of #n# " );
                    }
                });
            });

        });
    }

    // Reference solution for random tests
    function fnNameRef(){
    }
}

Default Sample Test Cases
// https://testbox.ortusbooks.com/
component extends="CodewarsBaseSpec" {
    // Submitted solution is written to Solution.cfc
    function beforeAll(){
        SUT = createObject( 'Solution' );
    }

    function run(){
        given( "Example", () => {
            when( "Basic tests", () => {
                then( "Input of 42", () => expect( SUT.fnName( 42 ) ).toBe( 42 ) );
            });
        });
    }
}

Feedback welcome.

@scottsteinbeck @jsteinshouer @steffan153 and @irmantas you all have submitted CFML kata translations.  Any feedback on my suggestions above?

@kazk It looks like no one has any input here (Other than @scottsteinbeck who replied directly to me in a Slack team).  Can you respond?

I don't know to what extend these are customizable

These are currently not customizable. Only the default test cases can be changed and it's used for both sample and submission tests. I can technically append some of these as comments, but it's also used when starting a regular kumite.

@kazk Hmm, so maybe we need a ticket that allows each of these to be customization.  I can say after writing a handful of translations, it was getting pretty old pretty quick to put the same boilerplate in every kata.  The consistency here seems like it would be nice.  I've actually had this tab open in the last week and just been copy pasting my suggestions into each kata translations as I write them.  (I loathe redundant work 😃 )

Please open a new issue requesting it on https://github.com/Codewars/codewars.com.

@kazk I hate to tag you here on an unrelated matter, but my coworker @gpickin has been trying to reach out to<EMAIL_ADDRESS>for a few days now with no response.  Can you confirm if that E-mail address is monitored, and if not, is there a better way to reach you or whoever else is in charge of Codewars to discuss things that don't really fall in the purview of a Github ticket?

Unfortunately I don't have access to that email. My email is kaz at qualified.io


Run Messaging CI on Xcode 15

Run FirebaseMessaging CI on Xcode 15.0.1 along with some changes:

Add SPM visionOS testing for Messaging and Storage
Defer Messaging integration tests on Xcode 15 pending PubSub test integration test failures
Only run unit tests via pod_lib_lint instead of doubling up in the messaging job
Rename messaging job to indicate that it is only to run the integration tests
Run all SPM platform tests in non-cron
Test --use-static-frameworks in cron instead of deprecated --use-modular-headers
Restore Storage cron
Move Storage integration tests back to Xcode 14 because of flakiness

#no-changelog

Consistently getting this integration test failure with Xcode 15.0.1:
FIRMessagingPubSubTest
    ✗ testSubscribeTopic, XCTAssertNil failed: "Error Domain=com.google.fcm Code=0 "Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field." UserInfo={NSLocalizedFailureReason=Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field.}"
    ✗ testUnsubscribeTopic, XCTAssertNil failed: "Error Domain=com.google.fcm Code=0 "Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field." UserInfo={NSLocalizedFailureReason=Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field.}"
FIRMessagingTokenRefreshTests
    ✓ testDeleteDataWithTokenRefreshDelegatesAndNotifications (1.587 seconds)
    ✓ testDeleteDefaultTokenWithTokenRefreshDelegatesAndNotifications (0.518 seconds)
    ✓ testDeleteTokenWithTokenRefreshDelegatesAndNotifications (1.053 seconds)

FirebaseMessaging_Unit_integration.FIRMessagingPubSubTest
  testSubscribeTopic, XCTAssertNil failed: "Error Domain=com.google.fcm Code=0 "Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field." UserInfo={NSLocalizedFailureReason=Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field.}"
  /Users/runner/work/firebase-ios-sdk/firebase-ios-sdk/FirebaseMessaging/Tests/IntegrationTests/FIRMessagingPubSubTest.swift:52

  messaging.subscribe(toTopic: "cat_video") { error in
    XCTAssertNil(error)
    expectation.fulfill()

testUnsubscribeTopic, XCTAssertNil failed: "Error Domain=com.google.fcm Code=0 "Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field." UserInfo={NSLocalizedFailureReason=Invalid registration response :'Error=INTERNAL_SERVER_ERROR'. It is missing 'token' field.}"
/Users/runner/work/firebase-ios-sdk/firebase-ios-sdk/FirebaseMessaging/Tests/IntegrationTests/FIRMessagingPubSubTest.swift:63

  messaging.unsubscribe(fromTopic: "cat_video") { error in
    XCTAssertNil(error)
    expectation.fulfill()

   Executed 5 tests, with 2 failures (0 unexpected) in 28.335 (28.394) seconds
2023-10-31 23:47:22.212 xcodebuild[14521:81384] [MT] IDETestOperationsObserverDebug: 898.275 elapsed -- Testing started completed.
2023-10-31 23:47:22.212 xcodebuild[14521:81384] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2023-10-31 23:47:22.212 xcodebuild[14521:81384] [MT] IDETestOperationsObserverDebug: 898.275 sec, +898.275 sec -- end
Failing tests:
  FIRMessagingPubSubTest.testSubscribeTopic()
  FIRMessagingPubSubTest.testUnsubscribeTopic()

** TEST FAILED **

Only run unit tests via pod_lib_lint instead of doubling up in the messaging job

Do you think this is something we should extend to other products as well?

Only run unit tests via pod_lib_lint instead of doubling up in the messaging job

Do you think this is something we should extend to other products as well?

In most cases, we don't. I'll review as I work through the Xcode 15 changes.


jquery 1.8 without SSL (https) from ajax.googleapis.com is blocked by some firewall

#In my company, jquery CDN url with out https is blocked.
Blocked URL:
http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
Working URL:
https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
I can see in if we browser below url its working,
https://plnkr.co/edit/?p=options
Because, this URL or route uses jquery with HTTPS - Identified from developer tools.
The same is not working with below urls, because, this URL or route uses jquery without HTTPS (http only)

http://plnkr.co/
http://plnkr.co/edit/SAl4YVXKRWpS7OeTYMrd?p=preview

Can we change all to HTTPS ?
#https://github.com/filearts/plunker_www/issues/110

Sry. Please close this issue. Raised in right repository.


Threading support

Hi
Do you plan to add threading support?

I couldn't make CloudSniffer multithreaded myself, since it relies on editing the hosts file, so I made my own version. Feel free to check it out, FlareHunter.


Add NodeJS Version

This is the promised nodejs version of the netty-finder
So you can install it from npm
$ npm install netty_finder

Look at the readme file for more info

Thank you @CITGuru


How to use the returned promise in typescript?

I asked this question on overflow a while ago, but didn't get any response, so I'm asking here now.
https://stackoverflow.com/questions/51544320/how-to-handle-the-return-type-of-dispatch-with-redux-promise-middleware

I don't use TypeScript (TS) on a regular basis and can't give you an expert answer.

Typescript expects returned properties like payload and type, which are actually not returned because the promise has been handled already and has ACTUALLY been returned

If TS expects fetchAllUsers to return a fetchAction object , can you change the type so TS expects fetchAllUsers to return a promise object?
    export default class ActionCreators {
      public static fetchAllUsers(): FetchAction {
        return {
          type: actionTypes.FETCH_ALL_USERS,
          payload: fetch("api.com/users")
        };
      }
    }

Something like:
 Promise<any>

You might have luck here:

https://github.com/Microsoft/TypeScript/issues/7588
https://github.com/Microsoft/TypeScript/issues/14871


PSQLException: ERROR: operator does not exist: vector <-> bytea

Hello,
I tried to use com.pgvector.PGvector as follow:
in my service, I get the embedding and put it in a PGvector(float[]):
      embedding = ArrayUtils.toPrimitive(response.getObject().getJSONArray("text_embedding").toList()
        .stream().map(o -> ((BigDecimal) o).floatValue())
        .collect(Collectors.toList()).toArray(new Float[0]));

return new PGvector(embedding);

in the repository layer, I send the request:
  @Query(value = "SELECT * FROM my_object ORDER BY embedding <-> :vector LIMIT 3", nativeQuery = true)
  @NotNull List<MyObject> findTopMatchingByVector (@Param("vector") PGvector vector);

But I get:
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: vector <-> bytea
  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.

Any idea?
Thanks in advance
Arnaud

Hi @jaspart, it looks like passing pgJDBC types directly isn't supported. You should be able to pass the vector as a String with vector.getValue() and cast in the query with embedding <-> CAST(:vector AS vector).

Fixed, thank you.

Great. It should be possible to add a UserType for Hibernate, so may do that in the future (#1).


Make notes match sample code

sample code places a file. The notes say it installs a package with YUM.
Correcting the notes.

Good catch, thanks @tomduckering!


fix: --ask-model print api name too

it looks like this:

This solution would be a great enhancement if mods fails to find the user-specified model as mentioned here. This is a great change!
Noice! :fire: