Make hidden fold ranges independent of range provider, add manual fol…

These changes accomplish two things:

Ranges of lines which have been collapsed (folded) are remembered and remain folded even when a subsequent call to the folding range provider does not include the collapsed range in its returned ranges. This change prevents spontaneous unfolds of ranges which the user has hidden in two known situations:
1a. When a folding range provider misbehaves or responds slowly.
1b. When ranges temporarily disappear due to changes such as removing the end marker of a comment block.

The saved view state for an edited file includes the currently hidden ranges. To prevent these from being incorrectly applied when the file is changed via an external process and then reopened in vscode, a checksum of each folded range has been added to the saved view state.

Added a user command to fold an arbitrary group of lines by first selecting the lines and then invoking the command. The default keyboard assignment for this is {ctrl+K, ctrl+.}
This command wasn't possible before change (1) above. It is added now because it is possible, seems very desirable, and is useful in testing (1) above.

Testing:  All previous fold functionality should remain the same. Except when a user manually folds a group of lines which overlap a fold group defined by the range provider. In that situation the code now removes the overlapping region(s) from the range provider until the user unfolds the overlapping manual region. The new functionality can be tested by using the new ctrl+k ctrl_. command and/or creating open-ended comments which surround previously folded regions.

Martin, a note in case you are concerned about added cpu load for the changes I proposed.
The added cpu time for these changes is very small relative to the total cpu time spent on folding.
Excluding the range provider, i.e. considering only the code which executes after the range provider returns its results, I think we could reduce the cpu time related to folding to be well below 1/5th of what it is now with a bit of work. If that is something you'd like to see from me I'd be happy to propose code changes for that.
Currently the great majority of time is spent I think in the underlying editor's decoration related functions. The key would be to minimize calls to those functions.

Martin, a note in case you are concerned about added cpu load for the changes I proposed.
The added cpu time for these changes is very small relative to the total cpu time spent on folding.
Excluding the range provider, i.e. considering only the code which executes after the range provider returns its results, I think we could reduce the cpu time related to folding to be well below 1/5th of what it is now with a bit of work. If that is something you'd like to see from me I'd be happy to propose code changes for that.
Currently the great majority of time is spent I think in the underlying editor's decoration related functions. The key would be to minimize calls to those functions.

Now added to this PR: A configurable folding regions limit and a user notification when the limit on number of folding regions is exceeded.

Hi Martin. No problem, now I know. I've reverted the configurable folding regions limit out of this PR. (Didn't think it was safe to delete commits so I used revert.) And submitted a new PR, #140480, with just the configurable limit in that one.

I merged current main into this to handle conflicts in folding.ts.

Martin, any news on this? I don't want it to get stale. I see there are now merge conflicts. I can deal with those if you are ready to handle this after I check that in.

Yes, sorry for the wait. I'll review it next week.

Ok, thanks Martin. I have updated the branch to match current main branch.

I started reviewing and testing. I like the approach.
I investigated the following issues:
Create typescript file:
class A {

    foo(p: A) {
        const foo = 9;
        console.log('fff' + p + foo);
        if (true) {
            console.log('fff');
            console.log('fff');
            console.log('fff');
        }
        console.log('fff');
    }
}

collapse foo
set the cursor on the line above 'foo', press enter
foo expands
the problem is in _currentHiddenRegions, isBlocked is tested against the old range positions. Should test against the current positions (using getDecorationRange)

Set the cursor after foo(p: A) { and press enter
The range stays folded, but no longer covers the last line
the problem is that for the end line the old range info is used (hiddenRange.endLineNumber - hiddenRange.startLineNumber)

The decoration currently only covers the first line. I think we need to change to cover the full range to correctly preserve the folded range.

Thanks very much Martin.
And thank you for finding those issues. My apologies.
I'm embarrassed by the first one. As you say, the problem is in isBlocked using the old positions.
Now that the code is in a branch in the Microsoft repository I don't know how I should submit a correction. I think the following would be a minimal change to fix that bug. In foldingRange.ts replace:
    if (!isBlocked(hiddenRange.startLineNumber, hiddenRange.endLineNumber)) {
        let decRange = this._textModel.getDecorationRange(this._editorDecorationIds[i]);
        if (decRange
          && decRange.startColumn === Math.max(decRange.endColumn - 1, 1)

by
    let decRange = this._textModel.getDecorationRange(this._editorDecorationIds[i]);
    if (decRange && !isBlocked(decRange.startLineNumber, decRange.startLineNumber + hiddenRange.endLineNumber - hiddenRange.startLineNumber)) {
        if (decRange.startColumn === Math.max(decRange.endColumn - 1, 1)

The second problem is tougher. Typing into a collapsed range seems wrong and I could argue either way for whether the new text should remain visible or not.  Maybe a third choice, should the range automatically unfold when a user does that?
It gets nastier. Suppose that the first line of a folded region, the one which remains visible, is something like if (xxx) { // do something. If the user hits enter in front of the { the resulting hidden region should be different than if they use enter after it. And the same is true of the terminating line if it looks like     } // the end
I played around with making the decoration region include a larger block of the text and things are still problematic that way. The best overall result seems to come from starting the decoration at the last character + 1 of the region and ending it at the first character of the line following the region. But it isn't perfect, especially when considering the cases mentioned above. And I'm not sure about possible consequences to other parts of the editor from having large decoration ranges hanging around.
I want to mull this over a bit. Maybe there's a simpler way.
By the way, do you recall the reason for the "isBlocked" test? I.e. under what conditions there can end up being an active selection point inside a hidden range when "update" is called?

I've explored the code which handles decorations. It is very nice. I don't think that increasing folding region decorations to cover their full range will trouble it at all. I think you were right about that as the way to go. I've ended up using the from start line's last column to the end line's last column + 1. That seems to work well in many cases. I've tested with adding text at end of first line and start of last line. Destructive backspace from start of end line un-collapses the fold. Global replace of something inside a hidden region which contains an end of line mostly works well. There are cases which misbehave, e.g. global replace which spans the start or end of a hidden region. That could be fixed by adding local (to folding) code which processes onchange events. And that might be desirable as part of an optimization effort. But for now it seems an acceptable oddity.
With this fix, all edits done in the visible line above and below a hidden region remain visible until the hidden region is unfolded by the user. To me that makes the best sense. It could be argued that some typed changes should disappear into the hidden region but I think that's just too disconcerting.
There are three places changed in foldingModel.ts for these fixes. Can you compare and pick them up from this copy? Or is there another way I should post it?

Thanks @PieterBranderhorst !
I see your commits on the branch. Also the foldingMode.ts matches what you have in this copy.
What's not working?
I haven't yet tried out your latest, so just to reply. What you write is all correct.

The decorations should not more expansive if they cover a range. BTW, there are also several options to configure them how they behave when editing happens at the start and end offset. We want to test with operations like format that typically create a lot of modifications.
The first line is officially not part of the folding range and editing in it should not expand the range
IsBlocked ensures that the current cursor positions never end up in folded regions. The enter just before ... is one example and when you remove a } at the end and the folding provider decides to expand the range.

What would be good to have some unit tests. The very least for the merge function.

I didn't understand how github would handle my push at this point in the process. All is well.
I am working on adding some unit tests. I expect to finish and push them tomorrow.

Thanks @PieterBranderhorst
The test case where I press enter right before the ... is still not working, the range does not expand. I would say the fix is to change the stickiness to AlwaysGrowsWhenTypingAtEdges. That way the range will expand.
Another test case is to press enter right before the {. The range stays folded. When the new ranges come in from the TS folding provider we end up with two folding ranges. One starting at foo expanded) and one at { (folded). Expand the folded, and the range goes away.
It's the expected behavior with the approach, just a bit surprising.

Hi Martin. Is this PR stuck because of the failed automatic check? I see that it failed in "Run Monaco Editor Checks". The files it seems to have a problem with aren't related to anything I modified. And when I try running " yarn monaco-compile-check" on my checkout of same thing it runs fine. I don't know what to do next.

@PieterBranderhorst I was on vacation last week. Sorry that this is not going quicker, but I also in regular work weeks I don't get much time to look at it. Please be patient.

@aeschli Might you perhaps transfer this task to someone else?

Sorry for the wait. I'm afraid there's no one else that knows the folding code as I do.
I've given it another morning of testing. It's still far too easy to get in funny situations.

detached ... decorators, located somewhere in the middle of the code
folding ranges that don't open when modifications are made.
folding regions that can be expanded but vanish right away once expanded.

I'm afraid this is not in a state that we can release it. In no time we will be flooded with issues.
Maybe we put this behind an experimental setting so that other users can try this out in real world project?

All of the behaviour in that GIF is as expected to me. It is working as I tried to explain in my note of February 9. With one possible small exception but that's not important for now I think, what's more important is the overall behaviour.
The rule the new code attempts to apply is "lines which are collapsed by the user and only those lines stay collapsed until the user expands them." I think that's more explainable than the previous rules.
I had hoped that you'd either find that an agreeable rule or suggest a different one. V.s. the production code which doesn't have an overall principle which I can easily describe. As I noted on February 9 the production code includes some behaviour which I think is rather bad. As well as having the underlying problem which was the original reason for this branch, the unwanted auto expansion of hidden regions in some situations.
You are of course the arbiter of this. I have a sense that you aren't much interested in folding enhancements and I understand that. There's no reason that you have to be interested. I have at least two more sets of folding enhancements I'd like to propose. (Visual indication of the code involved when hovering over fold icons in the gutter; language defined named types and associated fold/unfold commands and default fold-on-open settings.) If you have no enthusiasm for going there then I'd rather know and not put any time into them.
If you want to put this branch under an experimental setting then let me know and I'll recode it for that. How would that work? Am I right to guess that we'd add one setting which controls whether this code is enabled, and then rework the code so that all changes I made in this branch are conditioned on that setting?
I do think there are a fair number of users who'd like better code folding. In particular I think the "fold selected lines" command (ctrl+K ctrl+.) introduced in this current branch would get a lot of use. Personally that's the single folding feature I would most use if there were an editor which had it.  I haven't seen an editor which does folding especially well overall and that makes this hard to predict.
I would happily do this stuff in an extension if I could. But I can't. To do so would require additions to the extension API which would allow an extension to take over the handling of what is collapsed at any given time. Would you object to adding such an API? I'm not sure how it would look. I think it would have to be called each time the fold decorations and/or the editor's hidden regions are to be updated, with a list of all regions from the folding range providers. And then skip telling the editor about decoration and hidden state changes, leaving that task to the extension when it exists.
BTW I have been working on making my suggested rule-driven folding range provider from last fall into an extension. I have it working. And I've added indent-based folding and another useful option to it. So it could now entirely replace indentRangeProvider. I like the job it is doing for typescript folding better than the default typescript provider. I have some challenges making it worthwhile for end users because of setup issues. I'll probably end up asking for some enhancements related to that, e.g. a way to specify a default folding provider, a way to select a single folding provider for a language, and adding an alternate of string to the enum currently available for folding region types.

Yes, absolutely, the behavior is all expected knowing the how the new approach works.
The old (current) approach couples the ranges tightly to a syntax element. Once the syntax element is gone, the range is gone and expanded. Not always what the user wanted, but IMO easy to explain.
From a user's standpoint (just me, I admit), I think ending up ... somewhere in the code with a clear indication what it is folding is confusing.
Some of it can be fixed by refining when to expand on editing:  Enter after the ... or at the beginning of the last collapsed line should unfold.
And maybe ... is not ideal for the new approach and needs to be replaced with a placeholder that shows more about what is collapsed, e.g. {..}.
My problem is, I have no time budget for the folding feature. It is low on our team's priority list. I can't really afford getting many issues after a change. So we need to keep the changes small. But I also don't want to stand in the way.
If you want to continue to work on the feature and get other users opinions, we should but the new behavior behind a setting.
I'm also open to new API. Mayb eit would work if the folding provider can also give the folded state? Just a wild thought.
Or we focus on the fold selection feature, which has many requests.
Just to say it again your help is very welcome

Ok, I understand. I'm going to explore the options you mention a bit to see what tradeoffs and limitations there are. In order of preference:

Focus on the fold selection feature. Without changing any existing behaviour in a way which could generate ongoing user issues.
Enable this stuff via a new extension API.
Put this stuff behind an experimental setting.

I think I know what choice 1 should look like. It requires more code on this branch because manually collapsed ranges can't be automatically adjusted. My plan for choice 1 would be:

Add a flag to each folding range indicating whether it is "manual" or "provider".
When a folding range is added from a memento or via fold-selection it is marked as "manual". Otherwise it is marked "provider".
When a range provider returns a range which matches an existing "manual" collapsed range that range is changed to "provider". This will handle delayed response from a range provider after opening or switching to a file.
When a user edits the line before or the line after a hidden region:

If the change directly affects the hidden lines, i.e. delete key at end of first line or backspace at start of last line, expand the hidden range.
If the hidden lines are a "provider" range then what's hidden will change to match the new matching range returned by the range provider when it "makes sense". That's the same as the current production code with some auto-expand cases added. E.g. if the user deletes the closing "}" for a hidden range which goes from line 10 to 20 we might then get a range going from line 10 to 50 from the provider. In this case the code will auto expand the hidden region.
If the hidden lines are a "manual" range then what's hidden stays the same. All new typing outside the range stays outside the range.

When I've explored enough of choice 2 and 3 to make a recommendation between them and the above I will post here again.

@aeschli I've looked at 3 choices for how to proceed. I don't know enough about choice 3 to have a recommendation. I'd like you to choose among them if you don't mind.
Summary:

Continue with current approach.
Add APIs which enable extensions to provide more folding enhancements.
Put folding enhancements behind an experimental setting.

I think we don't want choice 1 unless neither of the other approaches looks good. Choice 1 puts the largest demand on your time. If neither other choice looks good then I think I should continue on this branch with a rule that no existing vscode behaviour is to change. And with knowing that it can take some time for you to get to reviewing.
Choice 2 requires extension API enhancements. I think the simplest ones which would enable an extension to do the work in this branch are:

Modify registerFoldingRangeProvider to have a new optional parameter indicating the provider type. Default type is "provider", new possible type is "controller".
Add a new optional field to the returned FoldingRange structure: isCollapsed, a boolean.
In syntaxRangeProvider change the calling of range providers and collecting their results into a two step process. Step 1 calls any non-controller providers and gathers their results. Step 2 calls the controller providers, passing them current hidden ranges and the results from step 1, and gathers their results. Then merge the results from the last stage which ran and return them as is currently done.
After each call to "compute" if a controller provider exists use the collapsed flags returned by the range provider(s) to update (replace) the current hidden ranges.
A new function extensions can call: recalculateFoldingRanges.

The things done in this branch can be implemented with choice 2. But it would still be limited in what can be done in future without your careful review. Things like settings for provider priority and highlighting folding regions on mouseover wouldn't be possible via code in an extension. (But some of their implementation could be in an extension by adding more APIs.)
I don't know enough about choice 3 to assess it. If we put changes behind an experimental setting then:

Would it relieve you of most of the effort in reviewing and testing proposed changes?
Would it be reasonable to start by copying folding.ts to new file experimentalFolding.ts and then invoke the new class when the experimental folding flag is turned on? That would make it very easy to confirm that the new code doesn't break anything in non-experimental operation. V.s. single sourcing which would require a harder look, especially when there's a new class member or bits of code move in refactoring. If a separate file and class name is used then the new code can of course still be diff'd vs its starting point.

What do you think? Should I get going on either approach 2 or 3?
Thanks,
Pieter

I was thinking of a setting like 'Always preserve folded regions`. At first, the setting would be disabled by default and have an 'experimental' in its name. The setting only affects ranges provided by folding providers that were folded but no longer reported. With the setting disabled, we would get the current (old) behavior they would be expanded). With the setting enabled, they would be preserved.
Ranges created by the 'fold selected' action would not be affected by the setting. Such ranges would always be preserved.
I suggest we first start with fold selected range to run with the current FoldingModel.update behavior. Have one PR for that that we can commit. After that, work on a second PR with the setting. But of course, whatever is easier.
What do you think?

I'm not wild about that approach. Two problems:

In the current branch code fold-selected came out as an almost free side-effect. It only needed the command handler added which is simple code. If fold-selected goes first it either gets most or all of that code anyway, or it is implemented with different more specific code which then either ends up with functional overlap or ends up needing to be refactored back to where we are already.
Fold-selected isn't what we started out to handle. While it may be a new feature a lot of people would like, we started out to address a problem users are experiencing with the current code. A serious problem for those who experience it.

I would prefer to further modify the current branch to recreate the existing behaviour when people edit the code at either end of a collapsed region (which is approach 1 above) or take approach 2 or 3. Much of those modifications (e.g. identifying the type of each hidden range as manual vs. provided) is code which would be needed anyway if doing only fold-selected.

No problem for me if you want to continue to modify the current PR code and not breaking the task up.
But are you ok with havening a setting that let's users to choose between the keeping collapsed regions or discard them if they are no longer reported? As said, when I tested I was not a big fan of having collapsed regions that no longer match a language construct. But I'm interested to see more users try this and report feedback.

Ok, I will continue via the current code. Making it match previous behaviour as much as possible. When done I think there may be just two cases where behaviour while the user is editing will be different. Let's see how close I can get it and then decide whether you still want that setting added.
This branch is adding a bunch of unnecessary merge bulk to the repository. When I have the next version ready should I rebase this, create a new branch so that this is killable, or just carry on in this branch?

Yes, rebase (and squash) would be good at some point. Either create a new branch or force-push to the existing branch. Both work.

I've made some fixes, squashed all commits in this branch, and rebased it on current source.
I haven't added an experimental flag. I am hoping you'll agree that where this version behaves differently from the current code it is an improvement.
I've added use of a different icon in the margin for regions which were manually folded. Please let me know what you think of it.
Situations I know of where this code behaves differently from the current code are:

With cursor at start of first line after a collapsed region do a <backspace>.
Current behaviour: Inconsistent. Depending on range provider and text involved either keeps region folded displaying a concatenated following line, or removes previous character with no visible change, or auto-unfolds the region.
New behaviour: Auto-unfold

With cursor at end of line at start of folded region, insert a character, or  to delete a character which is not a folding token, or <del>
Current behaviour: Auto-unfold
New behaviour: Keep region folded.

Split the line after a folded region (i.e. use <enter>), before the end token (e.g. "}")
Current behaviour: The newly created line before the split point disappears into the folded region.
New behaviour: Auto-unfold

Add a new start-of-comment with no matching end above one or more folded regions. Or remove a preceding end-of-comment. This is a case where the new behaviour is part of the purpose of the new code.
Current behaviour: The folded regions auto-unfold.
New behaviour: If there is just one hidden region affected it auto-unfolds. This is done because the code can't distinguish this situation from one where the opening token of a fold has been removed. If more than one hidden region is affected they remain hidden and are converted to manually folded regions. If the range provider subsequently provides matching ranges again, e.g. because the unmatched start-of-comment has been fixed, the hidden ranges are converted back to normal hidden ranges.

I hope we're getting close to something satisfactory now :)

You're right, it needed a better icon. I didn't want to add one (right chevron with some added glyph seemed ideal) and I hadn't considered ellipsis. I think it works well.
And yes, auto-expanding when using <del> at end of start line auto-expanding makes more sense. It is more consistent with the rest of the behaviour.
I've checked in both of those changes.

Yes, that's intended. This is the one deliberate odd behaviour. When the folding provider no longer returns a region which it previously returned and which is collapsed the foldingModel logic can't easily distinguish between three possible reasons:

The user modified the text in such a way that the region really is gone. E.g. They deleted the opening "{" of a region. In this case we should unfold it.
The user modified the text such that the region is now embedded in a comment or a string. In this case it makes sense to keep the region folded - the user may next close the comment or string before the region. And even if they don't the fold still makes a kind of sense.
The folding range provider is misbehaving. Very slow to respond or responding incorrectly. Which we think is the case in the issue which got this whole thing going. In this case we want the hidden region(s) to stay hidden.

Since the foldingModel can't readily distinguish between these cases I decided to treat it as case (1) if only one hidden region is affected and unfold it, and treat it as case (2) or (3) if more than one hidden region is affected. My reasoning is that even if it is wrong in treating a situation as the first case, as it is in your example, only one fold is affected and that isn't a big hardship to the user. I expect it will nearly never be wrong when treating something the other way.

Thanks @PieterBranderhorst. That took a long time, sorry for that. Let's see how users like it.

@aeschli Hi Martin. I'm glad you got this done, I'd given up on it.
Please ensure that the release notes mention ctrl-K ctrl-.
Though that wasn't what motivated this change I think that's the part that many people will use. It might get used more than the automated fold points :)
By the way, I've given up on my parameterized folding provider. I got it working as an extension but there are too many difficulties with integrating it with patterns provided by other extensions and as a result I don't think it would get used a lot. It really should be built-in to work well. If you ever want to reconsider it I could bring it up to date and resubmit, just let me know. It:

Works a lot better than you might think given that it uses regular expressions. I like what it does for Typescript folding better than the built-in Typescript folding provider. It doesn't have the shortcomings you might assume with regular expression parsing.
Has an option to include indent based folding code. So it could replace the existing indent based folding code while adding the new functionality.
Is very fast. Faster than the existing indent based folding, even in most cases for elaborate languages.

Also, if you become interested in this area again, I have an approach sketched which would highlight things as a user moves the mouse along the gutter containing the folding icons. It would highlight the code to be folded when over a collapse icon and would temporarily expand and highlight the folded code for expand icons. Please send me a note if this becomes something you'd like to pursue.
Ditto if you'd like a cleanup pass over the folding code. I think the hiddenRangeModel.ts code is almost all unnecessary at this point and could be removed, and efficiency could be improved for all of it by restructuring the internals a bit.

Hi @PieterBranderhorst, yes sorry for letting this lie around so long. The fold selection feature is a major motivation to get it out of the door. Also I wanted to get some user feedback so it's not just my opinions that shape this. I
So if you have some resources later on to respond to user feedback and fine tune the implementation, that would be great.

I'm curious to see if the 'unfold once' approach will work for users for 'Fold from selection'. I anticipate that some users want the range to stay, even if unfolded.
The current heuristic to find out which folded ranges to preserve is not super clear (also to me). See the example here where a single folded range goes away, but if there are multiple folded ranges, they stay. If you can add more background on what

You mention that we want to keep ranges that re in comment or a string literal. We could get that that information (textModel.tokenization.getLineTokens...)
On the other discussion:

hover over a folding icon would be great to have. Maybe a hover that shows the folded content?
parameterized folding provider: I'm not keen on adding that as a built-in provider.

Hi @aeschli,
I will watch Issues for feedback on this.
Regarding having manually created folding ranges persist: I do want to see how much that's wanted. It would be a bit tricky and require some thinking about handling detection of edits which should modify or remove it and about manual removal. It might be less wanted if we implement the highlight and temporary unfold when hovering over a fold icon. If we add that then users could quickly view the content of a manually folded range without unfolding it.
One other future feature on my list which I forgot to mention above: Ability to fold/unfold all regions of a specified type. This already exists but is minimal. It works for comments and "regions". But the folding provider interface, the settings related to "regions", and the "folding imports by default" weren't thought out as a generalizable subject so it would take a bit of rework. To allow language specific concepts like "functions" or "chapters" to be defined and used.
I understand you're not keen on the parameterized folding thing. But I think it would be used a lot. There are a huge number of syntax highlighting extensions for vscode. For many (most I think) of those languages it isn't worth the effort to create language providers nor folding providers. And some people would write custom ones for things like event logs. I think that even for Python a folding range provider was only added recently, and it had teething problems. If I continue working in this area this is the part I'd really like to do next.

I started working on https://github.com/microsoft/vscode/pull/155302 to simplify the merging rules.
Would you be ok with that simplification, or do you see a problem?


jit code on x86 incorrect about BPF_REG_7 and R12

We found the bpf code was translated incorrectly.
79 74 00 00 00 00 00 00 r4 = *(u64 *)(r7 + 0)
was translated to
mov    (%r8,%rcx,2),%r10
However, R8 and RCX are both 0, so the prog crashed.
We found this issue is about BPF_REG_7, it is mapped to R12 reg in Linux.
The commit 86a5001d4ad7111bd565d8fc4de9c231b8a9e835 and commit 3a6e60c962f9e1fec96dbf097514db65d3e0a22c tell us that, we should not use R12. But commit ff4b48a8a6f062955e3f49cd9dba54624173a974 brings it back.

I have observed the same issue. It seems that commit https://github.com/iovisor/ubpf/commit/ff4b48a8a6f062955e3f49cd9dba54624173a974 emits incorrect JIT code, leading to program crashes.

@xfoukas @dtcccc can you please share which ABI this is? Linux, Windows, or something else?

@Alan-Jowett, in my case this is the Linux ABI

Thanks. I am not seeing anything obvious from the code. As near as I can tell, r12 is a callee saved register (aka non-volatile) in the Linux x86-64 ABI, so the mapping from BPF_REG7 -> r12 should be fine.
Would it be possible to share the BPF byte code and the generated x64 code to better understand if the JIT is wrong?

Thank you @dtcccc and @xfoukas ! As @Alan-Jowett said, we are working on understanding the issue and fixing it. If you could provide the BPF byte code and generated x64 that would really help!
Thank you again for the report and for being users!

Here is my simple step:

prepare a file named "bpf.s"

	.text
	.file	"test.bpf.c"
	.globl	func                            # -- Begin function func
	.p2align	3
	.type	func,@function
func:                                   # @func
# %bb.0:
	r7 = r1
	r0 = *(u64 *)(r7 + 0)
	exit
.Lfunc_end0:
	.size	func, .Lfunc_end0-func
                                        # -- End function
	.addrsig

Then compile it by llvm-mc -triple bpf -filetype=obj -o bpf.o bpf.s

We can see the bpf byte code by llvm-objdump:

bpf.o:	file format elf64-bpf

Disassembly of section .text:

0000000000000000 <func>:
       0:	bf 17 00 00 00 00 00 00	r7 = r1
       1:	79 70 00 00 00 00 00 00	r0 = *(u64 *)(r7 + 0)
       2:	95 00 00 00 00 00 00 00	exit

load it ./build/bin/ubpf_test -j -m any_input_file bpf.o
and we will receive a core dump

find jit code in the core dump

   0x7fb4a9e61000:      push   %rbp
   0x7fb4a9e61001:      push   %rbx
   0x7fb4a9e61002:      push   %r12
   0x7fb4a9e61004:      push   %r13
   0x7fb4a9e61006:      push   %r14
   0x7fb4a9e61008:      push   %r15
   0x7fb4a9e6100a:      mov    %rdi,%r11
   0x7fb4a9e6100d:      sub    $0x8,%rsp
   0x7fb4a9e61014:      mov    %rsp,%rbp
   0x7fb4a9e61017:      mov    %rsp,%r15
   0x7fb4a9e6101a:      sub    $0x200,%rsp
   0x7fb4a9e61021:      callq  0x7fb4a9e6102b
   0x7fb4a9e61026:      jmpq   0x7fb4a9e61048
   0x7fb4a9e6102b:      sub    $0x8,%rsp
   0x7fb4a9e61032:      movq   $0x20,(%rsp)
   0x7fb4a9e6103a:      mov    %rdi,%r12
=> 0x7fb4a9e6103d:      mov    (%r8,%rcx,2),%rax
   0x7fb4a9e61041:      add    $0x8,%esp
   0x7fb4a9e61047:      retq
   0x7fb4a9e61048:      mov    %rbp,%rsp
   0x7fb4a9e6104b:      add    $0x8,%rsp
   0x7fb4a9e61052:      pop    %r15
   0x7fb4a9e61054:      pop    %r14
   0x7fb4a9e61056:      pop    %r13
   0x7fb4a9e61058:      pop    %r12
   0x7fb4a9e6105a:      pop    %rbx
   0x7fb4a9e6105b:      pop    %rbp
   0x7fb4a9e6105c:      retq
   0x7fb4a9e6105d:      callq  0x7fb4a9e61069
   0x7fb4a9e61062:      pause
   0x7fb4a9e61064:      jmpq   0x7fb4a9e61000
   0x7fb4a9e61069:      mov    %rax,(%rsp)
   0x7fb4a9e6106d:      retq

That is really helpful! Thank you! I think that what you are showing is what @Alan-Jowett and I supposed was the problem. We discussed (offline) the way to fix the problem and I am working as quickly and diligently as possible to correct the problem.

@dtcccc I tried to tag you in a comment on e307c30bea2adb39399d54a3ebb8ed6fe67e8d9b but I think that I screwed up. So, I am tagging you here, too. Sorry if you got multiple notices.

@hawkinsw , @Alan-Jowett , below is a sample code that leads to a segfault in my case.
This is the bpf bytecode of my program, as obtained by llvm-objdump:
Disassembly of section janus_generic:

0000000000000000 <janus_main>:
       0:       b7 01 00 00 00 00 00 00 r1 = 0
       1:       63 1a fc ff 00 00 00 00 *(u32 *)(r10 - 4) = r1
       2:       bf a2 00 00 00 00 00 00 r2 = r10
       3:       07 02 00 00 fc ff ff ff r2 += -4
       4:       18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll
       6:       85 00 00 00 01 00 00 00 call 1
       7:       bf 07 00 00 00 00 00 00 r7 = r0
       8:       b7 06 00 00 01 00 00 00 r6 = 1
       9:       15 07 0e 00 00 00 00 00 if r7 == 0 goto +14 <LBB0_3>
      10:       18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll
      12:       85 00 00 00 11 00 00 00 call 17
      13:       15 00 0a 00 00 00 00 00 if r0 == 0 goto +10 <LBB0_3>
      14:       61 71 00 00 00 00 00 00 r1 = *(u32 *)(r7 + 0)
      15:       63 10 00 00 00 00 00 00 *(u32 *)(r0 + 0) = r1
      16:       18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll
      18:       85 00 00 00 12 00 00 00 call 18
      19:       bf 06 00 00 00 00 00 00 r6 = r0
      20:       18 01 00 00 00 00 00 80 00 00 00 00 00 00 00 00 r1 =<PHONE_NUMBER> ll
      22:       5f 16 00 00 00 00 00 00 r6 &= r1
      23:       77 06 00 00 1f 00 00 00 r6 >>= 31

00000000000000c0 <LBB0_3>:
      24:       bf 60 00 00 00 00 00 00 r0 = r6
      25:       95 00 00 00 00 00 00 00 exit

In my case, I am unable to use ubpf_test to get a core dump with the x86 JIT code, because my program is in a different (non-Linux kernel) domain and uses its own set of helper functions, that ubpf_test does not support.
Instead, I got a dump of the buffer generated by ubpf_compile() in the attached file.
Note that the above example works well up until commit https://github.com/iovisor/ubpf/commit/3fb3da0ffef98be661bebae05043af0f14cfbed4, but leads to a segfault in commit https://github.com/iovisor/ubpf/commit/ff4b48a8a6f062955e3f49cd9dba54624173a974.

@dtcccc I tried to tag you in a comment on e307c30 but I think that I screwed up. So, I am tagging you here, too. Sorry if you got multiple notices.

@hawkinsw I just tested https://github.com/iovisor/ubpf/commit/e307c30bea2adb39399d54a3ebb8ed6fe67e8d9b and it fixes the issue. Thanks!

@dtcccc I tried to tag you in a comment on e307c30 but I think that I screwed up. So, I am tagging you here, too. Sorry if you got multiple notices.

@hawkinsw I just tested e307c30 and it fixes the issue. Thanks!

@xfoukas Thank you for the feedback! I am really glad that it fixes the issue!


chore(upcloud): improve permission error reporting

improve permission error reporting
unexport manager type
add more tests

@ajmyyra Thanks for the review :+1:
Yep, not the cleanest solution, but I needed something predictable to find match for Node in the NodeGroupForNode function :) Let's improve this at some point.


Fix slack notification if post includes double quote

[x] Fix slack notification if post includes double quote

Coverage increased (+2.2%) to 87.413% when pulling 6b0c613bde6b212bfce65367ef1b2f49533d572f on fix-slack-notifications into aa8c3504fab77e2664415d030fc15984067cbfa5 on master.


posthog-node v2.3.0 imports types from posthog-core without a dependency

Bug description
posthog-node v2.3.0 updated the types to import from posthog-core/src, but posthog-core is not listed as a dependency. This causes typescript builds to fail with the error "Cannot find module 'posthog-core/src' or its corresponding type declarations"
https://github.com/PostHog/posthog-js-lite/blob/6c6b01f2fab36973d9db3bfe727177a9c45297ef/posthog-node/src/types.ts#L1
How to reproduce

Install posthog-node
Try to build with typescript

Related sub-libraries

[ ] All of them
[ ] posthog-web
[x] posthog-node
[ ] posthog-react-native

Additional context
Thank you for your bug report – we love squashing them!

Thanks for the heads up! Working on this now

This should be fixed now!

That seems to have worked!


Benchmark discussion

Description

This is more for discussion that for merging
Several ideas were suggested:

have a benchmark folder in the repo root or inside notebooks
use scripts instead of notebooks, or use the notebook to show the results
Save the results to a json file which can be read by other notebooks or scripts
Split this notebook into 3 (cpu/gpu/spark) or even have one script for each algo to be computed in parallel in AzureML
Instead of using something like this code, modify the notebooks to have the same data and make a benchmark that uses papermill to run the other notebooks.
we need to make sure that the results are comparable

The objective here is to let users compare different algos. A path that users might have is to look at the summary table at the end to understand which algos are performing well, then they might try to add their own data and generate the results. Then maybe they will go to the deep dive notebooks to understand better the algo that has the better performance.
Please note that I haven't added /modified comments in this notebook
Checklist:

[ ] My code follows the code style of this project, as detailed in our contribution guidelines.
[ ] I have added tests.
[ ] I have updated the documentation accordingly.

Great proposal! The following are just my very personal opinions:

have a benchmark folder in the repo root or inside notebooks
Currently, we put the things into model_select_and_optimize, we can change if it is not a desirable place. It might be good to put the notebook into a dedicated folder but show the results in the front page (i.e., README).

use scripts instead of notebooks, or use the notebook to show the results
Either is fine, because a notebook can be converted to a script anyway 😄 . But as discussed in the meeting, personally I think it might be neater to standardize the "quickstart" notebooks and run the comparison with papermill.

Save the results to a json file which can be read by other notebooks or scripts
Good idea.

Split this notebook into 3 (CPU/GPU/Spark) or even have one script for each algo to be computed in parallel in AzureML
I think this can be done more easily if we just run each notebook onto a different remote instance (i.e., a DSVM or a Databricks cluster for Spark, a GPU DSVM or AML Compute for GPU algorithms, and a CPU DSVM or AML Compute for classic algorithms, respectively). This will also be in line with the on-going work with AML integration with papermill proposed by @danielsc

Instead of using something like this code, modify the notebooks to have the same data and make a benchmark that uses papermill to run the other notebooks.
Personally, I think this is a desirable approach.

we need to make sure that the results are comparable
Very important point. The quantitative comparison should be apple-to-apple, this should be carefully done in terms of evaluation protocol (i.e., data split, evaluation metric, etc.), hyperparameter tuning, etc. Maybe we can agree on the execution pipeline, and then design the protocol - I guess the latter requires some discussion.

I think this scales better if the individual algorithms are separate scripts or notebooks (notebooks retain consistency so that's how I would lean). If there are common pieces of code we should consider refactoring them into the utils. Also if they are separated it becomes easier to tune them.
I like the idea of setting up the data and kicking off all the notebooks via papermill, it basically becomes a big integration test suite. Even better to parallelize this on AzureML.

I'm happy to revert the code and follow Le's approach of running the notebooks using papermill and fixing the split of the data.
I think as a good point, it will cleaner, since we will add less code.
On the other hand, it will be less flexible since in the notebooks we will have some extra code that we might not need in the benchmark. (This could be addressed, as @yueguoguo suggested by standardizing the quickstart notebooks)
Just recap of the discussion so far:

people are ok to have a benchmark folder
not strong feeling about using scripts or notebooks for the benchmark
people are ok with saving the results to a json
We should split this so they can run independently
people tend more to revert the code, instead of using factories to define the parts of each algo, use the quickstart notebooks

some more views will be great @jreynolds01 @loomlike @anargyri @wutaomsft @nikhilrj @msalvaris @heatherbshapiro @eisber

A few comments:

We make a lot of reference to "collaborative filtering" algorithms in notebooks, but it would be great if we could describe it in the readme or in this notebook as well. It is in the
Why are there so many blank cells?
I think it will be good to have benchmarks folder so that users can easily find it
Add more text /comments around the cells to explain what is happening in each cell

I've added a benchmarks folder to the recipe template so that we can consistently have it as a folder across projects.

Thanks Miguel, this is really great! Do you plan to add all the algos (Surprise SVD, ALS, VW, NCF) too?
Regarding the discussion, do we also want to save models too? (I don't see any reason, but maybe there is). I also agree with Le that the data should be the same (ideally the splits would be the same, or we could average over several trials).
What you are doing currently is a benchmark for collaborative filtering on a specific data set (Movielens). However, the scope of the repo is broader than this. There will be other use cases soon (XDeepFM, Criteo etc.) and Wide & Deep already falls outside the scope of this comparison.
What is the broader plan beyond this notebook? It is not fair to "fit" those other use cases into this benchmark. Should we create additional benchmarking notebooks for other use cases e.g. one for feature based Movielens, one for click prediction etc.?

@anargyri sorry for the confusion. I did this last commit because @gramhagen and I were trying yesterday to find out what is the problem with this issue https://github.com/Microsoft/Recommenders/issues/631. The current master or staging are failing, but this notebook is working. So today we are going to debug this to fix it.
In relation with this PR, I think the idea supported by more people is to revert this code and use the quickstart notebooks as benchmark. We will need to make sure that the dataset splits that we have are exactly the same.

@anargyri sorry for the confusion. I did this last commit because @gramhagen and I were trying yesterday to find out what is the problem with this issue #631. The current master or staging are failing, but this notebook is working. So today we are going to debug this to fix it.
In relation with this PR, I think the idea supported by more people is to revert this code and use the quickstart notebooks as benchmark. We will need to make sure that the dataset splits that we have are exactly the same.

Ok, that makes sense. My comments applied to the earlier commits btw; but since you are going to change the code, they are obsolete.

Agreed to all the points you guys already made. On top of that, just want to +1 (Strong plus one) to parallel compute w/ AzureML!

hey, I'm going to close this and will start a different PR with what w agreed. Please don't erase the branch just yet, because I have parts here that will be reused


Allow slash in log group names

what

Custom label for cloudwatch log group name

why

Allow slash in log group names

references

https://sweetops.slack.com/archives/CB6GHNLG0/p1636985722167300

test
provider "aws" {
  region = "us-east-2"
}

module "cloudwatch_logs" {
  source = "github.com/cloudposse/terraform-aws-cloudwatch-logs?ref=allow-slash-log-group-names"

  name = "/aws/kinesisfirehose/aws-waf-logs-dev-app"
}

results in
  # module.cloudwatch_logs.aws_cloudwatch_log_group.default[0] will be created
  + resource "aws_cloudwatch_log_group" "default" {
      + arn               = (known after apply)
      + id                = (known after apply)
      + name              = "/aws/kinesisfirehose/aws-waf-logs-dev-app"
      + retention_in_days = 30
      + tags              = {
          + "Name" = "/aws/kinesisfirehose/aws-waf-logs-dev-app"
        }
      + tags_all          = {
          + "Name" = "/aws/kinesisfirehose/aws-waf-logs-dev-app"
        }
    }

/test all

/test all


[#18] [Backend] As a user, I can logout

Close #18

What happened 👀

Implement backend components for logging out API v1/oauth/revoke.
Clear token after logging out.
Add sample request in HomeViewModel.

Insight 📝
N/A
Proof Of Work 📹
2023-01-03 14:52:54.560 22535-22535/vn.luongvo.kmm.survey.android.staging D/HttpClientCallLogger$closeRequestLog: REQUEST: https://survey-api.nimblehq.co/api/v1/oauth/revoke
    METHOD: HttpMethod(value=POST)
    COMMON HEADERS
    -> Accept: application/json
    -> Accept-Charset: UTF-8
    CONTENT HEADERS
    -> Content-Length: 194
    -> Content-Type: application/json
    BODY Content-Type: application/json
    BODY START
    {
        "token": "dTSr1x247xz90AcKfInLFyGU0nRJEsqUI9hE8CuawQE",
        "client_id": "6GbE8dhoz519l2N_F99StqoOs6Tcmm1rXgda4q__rIw",
        "client_secret": "_ayfIm7BeUAhx2W1OUqi20fwO3uNxfo1QstyKlFCgHw"
    }
    BODY END
2023-01-03 14:52:54.938 22535-22588/vn.luongvo.kmm.survey.android.staging D/HttpClientCallLogger$closeResponseLog: RESPONSE: 200 OK
    METHOD: HttpMethod(value=POST)
    FROM: https://survey-api.nimblehq.co/api/v1/oauth/revoke
    COMMON HEADERS
    -> alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
    -> cache-control: max-age=0, private, must-revalidate
    -> cf-cache-status: DYNAMIC
    -> cf-ray: 783a285dfc969fcb-SIN
    -> connection: keep-alive
    -> content-type: application/json; charset=utf-8
    -> date: Tue, 03 Jan 2023 07:52:54 GMT
    -> etag: W/"13045cd5185cc8fb46c5a64c5a84ed33"
    -> nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    -> referrer-policy: strict-origin-when-cross-origin
    -> report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ocQSSdB8x2O83TSnqepGkrPKu8v9Q%2F7HoYblEwn81IWHY%2F6ihRyfuFVmIFpYkpCecuxenuTxZ0yGoc3OHklUdPi3q6cB6OnfmDdRH2Efh1x2jxB9QfFEFMUQzAQNaHbXBSZ9t600l%2Bvyo8ZM69j0rLF%2Bh%2FvC"}],"group":"cf-nel","max_age":604800}
    -> server: cloudflare
    -> strict-transport-security: max-age=31536000; includeSubDomains
    -> transfer-encoding: chunked
    -> vary: Accept-Encoding, Origin
    -> via: 1.1 vegur
    -> x-android-received-millis:<PHONE_NUMBER>932
    -> x-android-response-source: NETWORK 200
    -> x-android-selected-protocol: http/1.1
    -> x-android-sent-millis:<PHONE_NUMBER>562
    -> x-content-type-options: nosniff
    -> x-download-options: noopen
    -> x-frame-options: SAMEORIGIN
    -> x-permitted-cross-domain-policies: none
    -> x-request-id: ce37e83b-eb9e-4d4c-9016-dc05b1f8216d
    -> x-runtime: 0.011222
    -> x-xss-protection: 1; mode=block
    BODY Content-Type: application/json; charset=utf-8
    BODY START
    {}
    BODY END

Codecov Report

Merging #71 (863d387) into feature/17-home-menu-ui (e9197e7) will decrease coverage by 0.02%.
The diff coverage is 61.90%.

@@                     Coverage Diff                     @@
##           feature/17-home-menu-ui      #71      +/-   ##
===========================================================
- Coverage                    63.60%   63.57%   -0.03%
===========================================================
  Files                           65       67       +2
  Lines                         1209     1230      +21
  Branches                       217      217
===========================================================
+ Hits                           769      782      +13
- Misses                         358      366       +8
  Partials                        82       82

Flag
Coverage Δ

unittests
63.57% <61.90%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...vey/data/remote/datasource/AuthRemoteDataSource.kt
0.00% <0.00%> (ø)

...mm/survey/android/ui/screens/home/HomeViewModel.kt
87.09% <20.00%> (-12.91%)
:arrow_down:

...vey/data/remote/model/request/LogoutRequestBody.kt
80.00% <80.00%> (ø)

...rvey/data/local/datasource/TokenLocalDataSource.kt
100.00% <100.00%> (ø)

...o/kmm/survey/data/repository/AuthRepositoryImpl.kt
100.00% <100.00%> (ø)

...luongvo/kmm/survey/domain/usecase/LogOutUseCase.kt
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Symbol completion for Package.swift from SwiftPM project in a subfolder doesn't work

If you have a SwiftPM project in a subfolder of a VSCode workspace, SourceKit-LSP does not provide symbol completion, hover documentation for the Package.swift file even though a workspace/didChangeWorkspaceFolders request that adds the subfolder has been sent.
See https://github.com/swift-server/vscode-swift/issues/768

Synced to Apple’s issue tracker as rdar://127351614

I'm not sure if this is related, but in one of my projects, I keep getting a  "No such module" error from SourceKit in a regular file, not Package.Swift. One of the Code Helper processes also spins up to 100% CPU.
This is using a 6.0 snapshot. With 5.9, everything is fine.

I'm not sure if this is related, but in one of my projects, I keep getting a "No such module" error from SourceKit in a regular file, not Package.Swift. One of the Code Helper processes also spins up to 100% CPU.
This is using a 6.0 snapshot. With 5.9, everything is fine.

Could you file a separate issue for this? It seems like a different issue to me. Some initial thoughts:
Did you build your project with the Swift 6.0 snapshot as well? If you build your project using a different toolchain than the one that contains your sourcekit-lsp, SourceKit isn’t able to read your Swift modules, which might cause the issue.

@ahoppen I've opened #1223


When using tab with shortkey.push, holding tab and then pressing command or ctrl releases

I use v-shortkey.push="['tab']" to map the tab key, and events are recorded correctly both on press and release. But if I hold tab and then press either command or ctrl, I get a release event even though I haven't released the tab key. Why is this? If I accidentally touch e.g. command I will get inverted behaviour for the tab key in my use case, and since there is no way to tell if it was a press or release event, there is no workaround at the moment.

I will check this out. Thanks to your issue.


Use HACL in crypto examples

It would be nice to use HACL instead of CoreCrypto in examples/crypto to remove dependency on OpenSSL.

Can we list which primitives we need from HaCl ?

SHA1 and HMAC would be the first. I just talked with @jkzinzindohoue and one issue is that HST might rely on HyperHeap while many of the examples and tutorials use a plane heap.

Maybe. The plan for the core of Hacl is to be ready soon enough with some proofs at least, so the timing should be about right.
But in terms of code-size and complexity however I wonder. In particular it implies some understanding of the low-level libraries, which may be out of scope for what you want to do. I do not think they could replace as-is the current CoreCrypto interfaces.
What do you think ?

I think it is possible to abstract many of the low-level details by wrapping Hacl in a high-level interface that deals with the memory management. Generally speaking I think everyone would prefer not to depend on OpenSSL.

I agree. Not having to rely on OpenSSL would be nice.

Should we reassign a different milestone for this?

This would be nice, but such example may belong in a separate repo rather than the F* repo depending on HACL.


WSL - Manipulating files - Crashes remote to WSL

VSCode Version:
1.51.1
OS Version:
Windows 10 pro 1903 build 18362.1139
Steps to Reproduce:

open terminal as wsl
rm -rf node_modules in a node project
freeze and dissconnect from wsl
hafto force shutdown pc with power button

Does this issue occur when all extensions are disabled?: Yes/No
Well cant really use vscode without extensions now can I?

I'm not able to reproduce this issue. Can you pls provide a gif of this happening?


os-zerotier: Unable to add mulitple zerotier networks

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
[x] The title contains the plugin to which this issue belongs

Describe the bug
I am unable to add more than one zerotier network. After adding a second network, there is no interface available for assignment. The first network I add, I am able to assign an interface.
I have used multiple networks in the past but I am not sure what version of the plugin I was using then.
To Reproduce
Steps to reproduce the behavior:

Make sure you have two different ZeroTier networks created in the ZeroTier portal: https://my.zerotier.com/
Install zerotier plugin to OPNsense
Make sure you have no networks configured in '/ui/zerotier' Networks tab. Delete them if you do.
Add and enable the first network by following the steps outlined in the plugin documentation
Make sure to Allow the host on the first zerotier network in ZeroTier portal.
Go to '/interfaces_assign.php' and assign the new zt* interface - it should be able to be done successfully.
Add a second ZeroTier network as in step 4.
Make sure to Allow the host of the second zerotier network in ZeroTier portal.
Go to '/interfaces_assign.php' and attempt to add the new zt* interface - no interface will appear for assignment.

Expected behavior
An interface for all configured zerotier networks should be assignable
Screenshots
Relevant log files
Additional context
I have tried removing all networks and re-adding. I have tried uninstalling and reinstalling the zerotier plugin. I have tried rebooting. I have upgraded OPNsense to the latest version.
Environment
OPNsense 23.10.1_2-amd64
FreeBSD 13.2-RELEASE-p7
OpenSSL 1.1.1w
Licensed until 2026-10-15
AMD EPYC 3101 4-Core Processor (4 cores, 4 threads)

I played around with this some more. I created a new ZT network and was able to successfully add that. I was also able to re-add a network I had disabled and deleted on OPNsense which allowed me to have 3 networks configured. Unsure why I was not able to add the initial additional network but my issues has been resolved.


Create hacktoberfest.py

this program will print hacktoberfest 2022 for 1000 times

We're currently not accepting any PR's at this moment. Please Check back soon


incoming/tags.txt missing

No rule to make target 'incoming/tags.txt', needed by 'root.lexc'.

As for lang-esu, there was (despite the error message, which I was able to repeat) such a rule in src/fst/Makefile.am.
What I then did was to write
touch src/fst/incoming/tags.txt
touch src/fst/incoming/entries.lexc
(the second line as a response to the error message coming after the first command). Thereafter, nno compiled.
Now, this is not how we would like it to be. Whether the makefile should include a touch command or whether we should create and check in (empty?) files in incoming I do not know, but as it is now, it stops at the error message reported by Tino.

Fixed in commit 8bbdc1fb4edfc01650c97c5924928eb2606a86a7.


Error on exchangeCodeForSession when setting the token key for password recovery

Bug report

[x] I confirm this is a bug with Supabase, not with my own application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
I was trying to work on a more detailed workflow when recovering the password, and when I was taking a look at the source code, I've found a possible bug
When the recovery token is recorded into the storage, the key stored is sb-api-auth-token-code-verifier but when the code tries to exchangeCodeForSession at line 545, ${this.storageKey}-code-verifier.
this.storageKey is a constant set into the constants.ts named STORAGE_KEY and its value is supabase.auth.token
Due to this, when exchangeCodeForSession is executed, since it doesn't find the code-verifier, I receive this error:
AuthApiError: invalid request: both auth code and code verifier should be non-empty

To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

Send a email password reset link
Check the storage key created
Click on the reset link
When redirect to your site with the code query string try to execute exchangeCodeForSession with this value
See the error on console

Expected behavior
Recover the session to reset the password properly
System information

OS: macOS
Browser (if applies) chrome
Version of supabase-js:  2.39.3
Version of @nuxtjs/supabase: 1.1.5
Version of VueJs: 3.3.8
Version of Node.js: 18.16.0

Same bug here, I got this error message:
AuthApiError: invalid request: both auth code and code verifier should be non-empty
    at handleError (/Users/.../node_modules/@supabase/auth-js/dist/main/lib/fetch.js:63:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _handleRequest (/Users/.../node_modules/@supabase/auth-js/dist/main/lib/fetch.js:111:9)
    at async _request (/Users/.../node_modules/@supabase/auth-js/dist/main/lib/fetch.js:89:18)
    at async SupabaseAuthClient._exchangeCodeForSession (/Users/.../node_modules/@supabase/auth-js/dist/main/GoTrueClient.js:409:33)
    at async /Users.../node_modules/@supabase/auth-js/dist/main/GoTrueClient.js:736:28 {
  __isAuthError: true,
  status: 400,
  code: undefined

I have followed this steps from the docs
// sign-in.tsx
const { data, error } = await supabase.auth.signInWithOAuth({
			provider: "google",
			options: {
				redirectTo: "http://localhost:5173/auth/callback",
			},
		});

		if (data.url) {
			return redirect(data.url);
		}

On auth callback route
import { type LoaderFunctionArgs, redirect } from "@remix-run/cloudflare";
import { supabaseClient } from "~/services/supabase.server";

export async function loader({ request, context }: LoaderFunctionArgs) {
	const requestUrl = new URL(request.url);
	const code = requestUrl.searchParams.get("code");
	const next = requestUrl.searchParams.get("next") || "/";
	const headers = new Headers();

	console.log("code login\t", code);
	if (code) {
		const supabase = supabaseClient(request, context, headers);

		const { error } = await supabase.auth.exchangeCodeForSession(code);

		if (!error) {
			return redirect(next, { headers });
		}
	}

	// return the user to an error page with instructions
	return redirect("/auth/auth-code-error", { headers });
}

I am getting same error as
AuthApiError: invalid request: both auth code and code verifier should be non-empty
    at handleError (/home/hmlesam/FlashNDot/saralcms/dashboard/node_modules/.pnpm/<EMAIL_ADDRESS>.4/node_modules/@supabase/auth-js/dist/main/lib/fetch.js:63:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _handleRequest (/home/hmlesam/FlashNDot/saralcms/dashboard/node_modules/.pnpm/@supabase+aut
h-js@2.64.4/node_modules/@supabase/auth-js/dist/main/lib/fetch.js:108:9)
    at async _request (/home/hmlesam/FlashNDot/saralcms/dashboard/node_modules/.pnpm/@supabase+auth-js@2
.64.4/node_modules/@supabase/auth-js/dist/main/lib/fetch.js:89:18)
    at async SupabaseAuthClient._exchangeCodeForSession (/home/hmlesam/FlashNDot/saralcms/dashboard/node
_modules/.pnpm/@supabase+auth-js@2.64.4/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js:408:33)
    at async /home/hmlesam/FlashNDot/saralcms/dashboard/node_modules/.pnpm/<EMAIL_ADDRESS>_modules/@supabase/auth-js/dist/main/GoTrueClient.js:719:28

{
  __isAuthError: true,
  status: 400,
  code: 'validation_failed'
}

System Information:
OS: Fedora
Nodejs: 20.11.0
"@supabase/ssr": "^0.4.0",
"@supabase/supabase-js": "^2.45.0"
Framework Remix:
"@remix-run/cloudflare": "^2.10.3",
"@remix-run/cloudflare-pages": "^2.10.3",
"@remix-run/react": "^2.10.3",

This appears to be related to #545
I can confirm that this bug is happening to another project which uses svelte rather than react.


How to delete vertex of vector element in EditableVectorLayer

I have used EditableVectorLayer to edit the object. But I couldn't find a way to delete a vertex. Can you give me an idea for this? Please help me. Thank you so much

I do not think we have a demo for this in our samples projects. We had a more complete editing demo for Nutiteq SDK 3 that included this feature. The demo app worked this way: once dragging started, we displayed a 'garbage bin' icon on the corner of the screen. If user dragged a point to the garbage pin, the point was removed.
You can find the relevant source code here:
https://github.com/nutiteq/gismap3-android/blob/master/com.nutiteq.gismap3/src/com/nutiteq/gismap3/EditableOverlayActivityBase.java
I believe the editing API has changed very little, so the code can be perhaps simply copied. The relevant methods are onDragStart, onDragMove and onDragEnd.

Thanks @mtehver ,
I have looked at your sample code, but it seems to only deleting the selected element but not the vertex

@phammanhdam No, this is not correct. The code I referenced deletes the vertex being dragged.  Please take a closer look at the following method:
public VectorElementDragResult onDragEnd(VectorElementDragInfo dragInfo) {
    		Log.debug("dragEnd");
    		dragging = false;
            Rect rect = new Rect();
            deletePointBtn.getHitRect(rect);
            deletePointBtn.setColorFilter(null);
            deletePointBtn.setVisibility(View.GONE);
            addPointBtn.setVisibility(dragInfo.getVectorElement() instanceof Line ? View.VISIBLE : View.GONE);
            boolean onDeleteBtn = rect.contains((int) dragInfo.getScreenPos().getX(), (int) dragInfo.getScreenPos().getY());
            return onDeleteBtn ? VectorElementDragResult.VECTOR_ELEMENT_DRAG_RESULT_DELETE : VectorElementDragResult.VECTOR_ELEMENT_DRAG_RESULT_MODIFY;
    	}

If the vertex is dragged to the garbage bin icon, the method returns VectorElementDragResult.VECTOR_ELEMENT_DRAG_RESULT_DELETE, which signals the SDK to remove the vertex.

I tried deleting the vertex of the polygon, it's works well until there are 3 vertices left will crash app.
I don't know the reason

@phammanhdam No problem. Regarding the crash, not sure why this happens. If you delete a vertex of a triangle, SDK should automatically remove the element by calling onElementDelete.

@mtehver Thank you very much and a map sdk awesome


Add GitHub Action

See #30

@wtcox This eml-cts doesn't have any tests so no tests are run. I added the test step for tests that may be created in the future.


currentLanguageProvider erroring on migrated WWN save

Describe the bug
I migrated a WWN save from 0.9 and it consistently fails to return a definition when trying to assign the currentLanguageProvider variable in api.js line 39, which cascades to setting assignment in settings.js line 87 resulting in an undefined value when trying to generate settings, which breaks the module functionality. I can only repro this on this save, seems fine on another migrated WWN world. Resetting settings, uninstalling and reinstalling module don't seem to affect it.

WWN 1.1.1
Polyglot 1.8.10
Are you using Babele? No

Error log:
Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'isGeneric')
[Detected 1 package: polyglot]
at registerSettings (settings.js:88:36)
at Object.fn (polyglot.js:20:2)
at #call (foundry.js:724:20)
at Hooks.callAll (foundry.js:681:17)
at Game.setupGame (foundry.js:7913:11)
at Game._initializeGameView (foundry.js:8999:16)
at Game._initializeView (foundry.js:8975:21)
at Game.initialize (foundry.js:7825:16)
foundry.js:747 TypeError: Error thrown in hooked function 'bound renderChatLog' for hook 'renderChatLog'. Cannot read properties of undefined (reading 'languages')
[Detected 1 package: polyglot]
at Polyglot.updateUserLanguages (logic.js:306:91)
at Polyglot.renderChatLog (logic.js:222:8)
at #call (foundry.js:724:20)
at Hooks.callAll (foundry.js:681:17)
at ChatLog._render (foundry.js:5153:13)
at async ChatLog._render (foundry.js:60343:5)
at async ChatLog._render (foundry.js:74100:5)
at async Promise.all (index 2)
onError @ foundry.js:747
foundry.js:747 Error: Error thrown in hooked function '' for hook 'ready'. This is not a registered game setting
[Detected 1 package: polyglot]
at ClientSettings.get (foundry.js:2799:42)
at Polyglot.ready (logic.js:484:44)
at Object.fn (polyglot.js:25:16)
at #call (foundry.js:724:20)
at Hooks.callAll (foundry.js:681:17)
at Game.setupGame (foundry.js:7952:11)
at async Game._initializeGameView (foundry.js:8999:5)
at async Game.initialize (foundry.js:7825:5)

What value does game.settings.get("polyglot", "languageProvider") returns? If it isn't native.wwn, use game.settings.set("polyglot", "languageProvider", "native.wwn") to reset it.

It was returning just native for some reason. But that reset fixed it, thanks!
I'm know JS but I'm just starting to familiarize myself with Foundry's guts so this was a little past my ability to troubleshoot quickly on my own. Cheers!


close idle connection in pool

when using PooledClient with gevent, it comes more and more idle connections between memcached and python server, this PR is trying to close the idle connections which idle duration greater than pool's obj_idle_timeout.

I will send a new PR.


Sort all JSON properties.

Today, the property order is inconsistent within various JSON objects. At a technical level, this is not a problem as property order does not "matter" to maps/dictionaries. However, the inconsistent ordering in the JSON text files in the repository itself presents a few challenges beyond the consumers of this database.
The first issue is minor. Anyone who wishes to contribute new properties has no guidelines for where to put those properties. By standardizing on a sequence, this ambiguity goes away.
The second issue is less minor. As noted in #148, there are opportunities to quickly and easily make sweeping changes to the database using software tooling. Importing the data into memory for processing/transformation is fine: it does not care about the ordering. However, due to the inconsistent ordering that currently exists, the moment any such tool exports the data back out, it will trigger a massive diff in Git/GitHub, making it next to impossible for anyone to reasonably review the changes.
The purpose of this PR is to standardize the ordering. I have simply chosen to alphabetize the properties as it is a relatively future-proof approach, and the rule is easy to remember. The downside is that the properties are not in any kind of sensible order. (The back of the card comes before the front? The title isn't at the top? Etc.) I'm open to alternatives (specify a standard order in an spec sheet).
After transforming the data, I compared the results using JSON Diff. It says there are zero semantic differences. So, if we decide we like this direction, this PR is ready to go.

Just an FYI: I'll be out of town the next week. So, there's no rush on this one. Take your time. Discuss it. Give feedback/thoughts, please. I'll be back around Jan 15.

I'm fine with reordering, but it would be super nice if the JSON validation step could somehow enforce alphabetizing all the fields if that's what we're going with.

Since other PRs are in progress, I'll close this until a future attempt can be made.


Set up deploy for android sample project

Description of Change
Set up deploy for android sample project.
PR Checklist

[ ] Has tests (if omitted, state reason in description)
[ ] Has samples (if omitted, state reason in description)
[x] Rebased on top of main at time of PR
[x] Changes adhere to coding standard
[ ] Updated documentation

Sorry didn't saw https://github.com/xamarin/XamarinCommunityToolkit/pull/713

Sorry didn't saw https://github.com/xamarin/XamarinCommunityToolkit/pull/713


Contractions missing whitespace after expansion

Hi guys,
I couldn't find any similar issues reported so here goes:
On your site, the example for contraction expansion expands

We've only just begun, to live. White lace and promises. We'll start out walkin' and learn to run.
to

We haveonly just begun, to live. White lace and promises. We willstart out walkin' and learn to run.
There is a missing space after the 2nd part of the expanded contraction.
Cheers

Will be fixed by #116

nice one David! thanks!


add needed dependendencies for mysql and mssql

A recent upgrade in flyway versions caused a regression which meant that we can no longer connect to mysql or mssql databases, as the dependencies from flyway were pulled out into additional dependencies. This MR adds those dependencies, and writes a small test to catch if other dependencies are pulled out.

Yup this is just the internal driver that is used based on the jdbc url provided. I'm essentially just checking "Hey is this non-null and have some sane value


Honeycomb is not receiving events

I'm setting the subscriber configuration in the most basic way:
// Use honeycomb
let honeycomb_api_key = dotenv::var("HONEYCOMB_API_KEY").unwrap();
let honeycomb_config = libhoney::Config {
    options: libhoney::client::Options {
        api_key: honeycomb_api_key,
        dataset: "my-dataset".to_string(),
        ..libhoney::client::Options::default()
    },
    transmission_options: libhoney::transmission::Options::default(),
};
let telemetry_layer = tracing_honeycomb::new_honeycomb_telemetry_layer("my-service", honeycomb_config);
let honey_subscriber = tracing_subscriber::Registry::default()
    .with(tracing::level_filters::LevelFilter::INFO)
    .with(tracing_subscriber::fmt::Layer::default())
    .with(telemetry_layer);
tracing::subscriber::set_global_default(honey_subscriber).expect("setting global default failed");

I can see events logged in stdout but nothing is received on the Honeycomb layer. I've checked that the API key is the correct one. Any way to see what's going on?

As a workaround, there is now a good implementation here: https://github.com/Dhghomon/rust_opentelemetry_honeycomb.

You need to use register_dist_tracing_root. Anyways, I think honeycomb is moving towards opentelemetry.


Palladium Rifts by Grinning Gecko v1.6.1 - New Feature

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

Changes / Description

Add option to add skill roll to skill %, where a success is 101 or greater.

Character Sheet Info Roll20 Internal Use only.


EXC_BAD_ACCESS with a project setup with Carthage, Xcode 9.4

Don't know if it's just me, but I'm getting a crash when using Xcode 9.4 (9F1027a), Swift 4.1.2. Here's an example demonstrating the issue:
https://github.com/mkko/RxMKMapViewCrash
The issue is reproducible in simulator when building with Carthage. It seems that with CocoaPods everything's fine with same versions. I haven't tried manual setup yet.
There could be something I missed, but I've been using RxMKMapView without issues with Xcode 9.2 (9C40b), Swift 4.0.3. I'd be just happy to hear whether it is just me or if this issue is real.
Here's the stack trace of what I get:

Manual setup works fine, so there's something weird either with my machine or with the output generated by Carthage.

Unfortunately I have very little experience (or liking) with Carthage so I will be of little help. If you find the issue and want to submit a PR, I'd love to take a look and merge. Thanks !

@freak4pc Do you have the chance to try out if the crash is real? It's simply a matter initialising the project from the command line with carthage bootsrap and then running the project.
I'm happy to try to figure out what's wrong here, just not sure how. I'm guessing Carthage build produces somehow messed up binaries, so I guess I'll start figuring out what's different there.

I think I've figured the reason for the issue. From what it looks like Carthage mistakenly builds the example app (the actual framework included) instead of the actual framework. It could be some automatic behavior prioritizing Xcode workspace files over project files, I still need to check this.
I also don't know what actually gets messed up with the built framework, but I guess it doesn't matter since the problem is kind of obvious now.
I'll continue on this to find some clean solution.

Okay, so this is intended behavior with Carthage; it prefers .xcworkspace files over .xcodeproj. I think the only option here is to include a workspace file on the root level.
Here's a discussion on similar issue with RxSwift and Carthage.

Gotya. A tad weird but if that's the case we can go with it.
I think It'd be best to add a xcworkspace build thing as well as a Carthage build to make sure its always possible to build. (or at least the former). What do you think?
https://github.com/RxSwiftCommunity/RxMKMapView/blob/master/circle.yml

Agreed, I already answered in the PR. Sadly no clean way around this, so that's our only option.

Fixed in #35


No option to change color of URL string in code like in other editors. Please don't ignore.

VS Code Version: 1.53.2
OS Version: Windows 10

Steps to Reproduce:

Open this code in vs code : https://pastebin.com/gxd27Cg6
Here we can not see any difference that there is a link opened here.
And yes, this is not a theme specific issue, I tried it out with different themes out in the market.
Compare results by opening same in ATOM CODE EDITOR.
Attaching Image for reference:

I also tried to use Developer: Inspect Editor Tokens and Scopes and tried some things in settings.json file, but they were of no use
So what I want is that there should be a option out there to change the color, so anybody who wants that can do that.
Thank You

Does this issue occur when all extensions are disabled?: Yes

The Developer: Inspect Editor Tokens and Scopes tool shows you the scopes generated by the html grammar

They are not the same, so you can write a coloring rule to give one of them a different color:

	"editor.tokenColorCustomizations": {
		"textMateRules": [
			{
				"scope": ["meta.tag.metadata.script.start string.quoted.double.html", ],
				"settings": {
					"foreground": "#FF0000",
				}
			}
		]

	}

I don't know why Atom is different. It might use a different HTML grammar than VSCode, or the themes are different.
Closing as with the information above you can customize your themes or create a new theme.

Ya but why does it not color the https://www/google.com

You can also color https://www/google.com by looking at the TextMate scope and add it to you customization. I somehow understood you only want links in src.
Maybe I misunderstood your request then. What do you want to have colored differently?


Simple linked list implementation

Hello @voila!
As there is no canonical data available for this exercise, could you please elaborate on how you came up with the tests?
Have you compared with other tracks? Did you come up with them while you simply tried to implement in a TDD manor? Something else?

Hi @NobbZ , I copied the tests from the Javascript track

I copied the tests from the Javascript track

Okay, I'll keep that in mind when reviewing.

PS: Please also take a look at the haskell track for how they test, I think its a much better inspiration than JavaScript, as its idioms are much closer.

Thank you for putting all the work into this!

@NobbZ thanks for guiding me through this!


need to specific string translation for specific language code

Laravel Version: ^7.0
joggapp/laravel-google-translate: ^6.0
We need to fix string translation for particular string for a specific language code and we are just use below function.
@translate('Testing string', $languageCode)
Appreciated in advance for your support!!!

the issue isn't exactly clear. To learn how to use the package, please refer the readme of the package thanks.


Introduce ReadOptions with builder API, filter row groups that satisfy all filters, and enable filter row groups by range.

Which issue does this PR close?

Closes #158.
Rationale for this change
To support parallel parquet reading at row group level.
What changes are included in this PR?

One extra parameter while filtering row groups using row group metadata.
The midpoint and range comparison are from parquet-mr ParquetInputSplit semantic by selecting belonged row groups.
Are there any user-facing changes?
Yes.

Codecov Report

Merging #1389 (08515d5) into master (89ee9ac) will increase coverage by 0.07%.
The diff coverage is 96.59%.

@@            Coverage Diff             @@
##           master    #1389      +/-   ##
==========================================
+ Coverage   83.03%   83.10%   +0.07%
==========================================
  Files         181      181
  Lines       52936    53260     +324
==========================================
+ Hits        43955    44264     +309
- Misses       8981     8996      +15

Impacted Files
Coverage Δ

parquet/src/file/serialized_reader.rs
95.13% <96.59%> (+0.50%)
:arrow_up:

parquet/src/file/statistics.rs
91.73% <0.00%> (-2.07%)
:arrow_down:

parquet/src/util/cursor.rs
77.31% <0.00%> (-1.69%)
:arrow_down:

parquet/src/schema/types.rs
85.64% <0.00%> (-1.51%)
:arrow_down:

arrow/src/csv/writer.rs
71.32% <0.00%> (-0.82%)
:arrow_down:

arrow/src/array/array_dictionary.rs
91.12% <0.00%> (-0.47%)
:arrow_down:

arrow/src/array/data.rs
83.15% <0.00%> (-0.44%)
:arrow_down:

arrow/src/json/writer.rs
92.11% <0.00%> (-0.37%)
:arrow_down:

arrow/src/ipc/writer.rs
83.14% <0.00%> (-0.32%)
:arrow_down:

parquet/src/util/bit_util.rs
93.01% <0.00%> (-0.19%)
:arrow_down:

... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89ee9ac...08515d5. Read the comment docs.

Integration test failure seems unreleated.

Thanks @yjshen


[stdpar] DWARF error with clang 18

Reported by @breyerml: stdpar with clang 18 was reported to result in this error:
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
CMakeFiles/plssvm-base.dir/src/plssvm/backends/SYCL/implementation_types.cpp.o: in function `operator delete(void*)':
implementation_types.cpp:(.text+0x20): multiple definition of `operator delete(void*)'; /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
CMakeFiles/plssvm-base.dir/src/plssvm/backends/SYCL/kernel_invocation_types.cpp.o:kernel_invocation_types.cpp:(.text+0x20): first defined here
/usr/bin/ld: CMakeFiles/plssvm-base.dir/src/plssvm/backends/SYCL/implementation_types.cpp.o: in function `operator new(unsigned long)':
implementation_types.cpp:(.text+0x390): multiple definition of `operator new(unsigned long)'; CMakeFiles/plssvm-base.dir/src/plssvm/backends/SYCL/kernel_invocation_types.cpp.o:kernel_invocation_types.cpp:(.text+0x390): first defined here
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
CMakeFiles/plssvm-base.dir/src/plssvm/backends/stdpar/implementation_types.cpp.o: in function `operator delete(void*)':
implementation_types.cpp:(.text+0x20): multiple definition of `operator delete(void*)'; CMakeFiles/plssvm-base.dir/src/plssvm/backends/SYCL/kernel_invocation_types.cpp.o:kernel_invocation_types.cpp:(.text+0x20): first defined here

I cannot reproduce this, could you provide more information about your setup @breyerml ?

Sorry for the late reply.
I can't reproduce the problem on a small example either. However, I can reproduce it on our project:
git clone git@github.com:SC-SGS/PLSSVM.git
cd PLSSVM
git checkout develop
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPLSSVM_TARGET_PLATFORMS="nvidia:sm_86" -DPLSSVM_ENABLE_ASSERTS=OFF -DPLSSVM_ENABLE_TESTING=OFF -DPLSSVM_ENABLE_DOCUMENTATION=OFF -DPLSSVM_ENABLE_LANGUAGE_BINDINGS=OFF -DPLSSVM_ENABLE_LTO=OFF -DPLSSVM_USE_FLOAT_AS_REAL_TYPE=OFF -DPLSSVM_ENFORCE_MAX_MEM_ALLOC_SIZE=OFF -DPLSSVM_ENABLE_PERFORMANCE_TRACKING=OFF -DPLSSVM_ENABLE_HARDWARE_SAMPLING=OFF -DPLSSVM_ENABLE_OPENMP_BACKEND=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=OFF -DPLSSVM_ENABLE_HIP_BACKEND=OFF -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=OFF -DPLSSVM_ENABLE_STDPAR_BACKEND=ON -DCMAKE_CXX_COMPILER=acpp ..
make -j

Note that "nvidia:sm_86" should be changed to the correct sm_ value (or cpu for the CPU or amd:gfx??? with the correct gfx version for AMD GPUs).
Since it works in a small example it may also be the case that our CMake files are faulty. However, it is interesting that it works perfectly fine with older LLVMs.

I still cannot reproduce (with -DPLSSVM_TARGET_PLATFORMS="cpu"). Maybe your linker is too old to understand some of the debug info that clang18 emits? Can you try a different linker, maybe just lld (e.g. by passing -DCMAKE_CXX_FLAGS=-fuse-ld=lld)?
Also, the cmake command you provided only works on my local machine. I wanted to also try on a different machine that has CUDA installed but the output I get is this:
-- The CXX compiler identification is Clang 17.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/nfriess/AdaptiveCpp/build/install/bin/acpp - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using a single-configuration generator.
-- The single-configuration build type is 'Debug'.
-- Compiling for x86_64: setting -march=native
-- stdpar:  Checking for stdpar backend
-- stdpar:  searching for NVHPC (nvc++)
-- stdpar:  searching for NVHPC (nvc++) - skipped
-- stdpar:  searching for roc-stdpar
-- stdpar:  Try checking for the roc-stdpar backend but the roc-stdpar include path wasn't provided via "PLSSVM_STDPAR_BACKEND_HIPSTDPAR_PATH"!
-- stdpar:  searching for roc-stdpar - skipped
-- stdpar:  searching for Intel LLVM (icpx)
-- stdpar:  searching for Intel LLVM (icpx) - skipped
-- stdpar:  searching for AdaptiveCpp
-- stdpar:  searching for AdaptiveCpp - skipped
-- stdpar:  searching for GNU GCC + TBB
-- stdpar:  searching for GNU GCC + TBB - skipped
-- stdpar:  Checking for stdpar backend - not found
CMake Error at CMakeLists.txt:386 (message):
  At least one backend must be available!


feat!: use raw string for  css doesn't need to be double escaped

I think i'm understanding the distinction between these correctly. Is there a downside to doing this?
https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

praise: that's a nice cleanup, too


How to properly use logit_bias

Discussed in https://github.com/openai/openai-cookbook/discussions/676

Originally posted by Clement-Lelievre September  4, 2023
Reposting my issue on Tiktoken's repo
I need to use the openAI Chat endpoint and prevent some words from appearing in the model's completion.
To achieve this, I use the logit_bias  parameter, which expects a mapping of tokens to an int value (-100 in my case). This is where tiktoken comes in.
PROBLEM: the forbidding mechanism described above works at token-level, not at word-level. Therefore, and because some tokens are shared across words, forbidding a token with a specific word in mind can result in unintended consequences, namely forbidding other words in the process.
EXAMPLE: I want the model's completion to NOT include the word "impossible". The tokens for this word as per cl100k_base are: [318, 10236] . So I pass to my openai query: logit_bias = {318 : -100, 10236 : -100} . However, because the token list for the word "possible" using the same encoder is : [10236] this could result in an unwanted ban of the word "possible".

GPT being a decoder-only model has an inference mechanism that respects generated tokens as a prefix of the next result. Treating it as an optimizer that runs forever on a freeform grammar, where each state leads to another state that simply adds an arbitrary next token, setting logit_bias on a token to -100 would eradicate all branches (on this grammar) whose ancestors contain this token. It is therefore not possible to only eliminate the word impossible, without affecting either possible or all words prefixed with im-.
There is, however, one solution that can achieve your requirements, at the cost of extra latency (at least 3x) and input token cost:

Decode with end_token set to the prefix  im.
Attempt to retrieve the next 2 tokens with this new prefix (i.e. include the incomplete text generated by the assistant).
Should the next 2 tokens concatenate into  impossible, do not attempt to add these 2 tokens into the history. Generate exactly 1 token again, with the token  im banned, based on the output from Step 1.
Goto Step 1, this time (as it had) without any logit_bias set.

In this way you can totally avoid the word impossible without impacting the word possible or any word starting with the prefix im-. But as I said, it could be expensive.


0.9.10

Trix v0.9.10 is out

Will publish a new version later today.

Should be fixed by https://github.com/maclover7/trix/commit/0fce06f6aa51d61355d8936bfde0445148ae5a8d.


.dart___jb_tmp___: Could not find asset

I see this build error a lot in Webstorm with Polymer.dart (dart 1.18.1). It happens when I have pub serve running and I change my code. To get rid of it I stop pub serve and restart it.
Build error:
Failed to load source asset akepot|lib/competences_service.dart___jb_tmp___: Could not find asset akepot|lib/competences_service.dart___jb_tmp___.
package:pub/src/barback/pub_package_provider.dart 110  PubPackageProvider._assertExists
package:pub/src/barback/pub_package_provider.dart 104  PubPackageProvider.getAsset.<async>
Build error:
Failed to load source asset akepot|lib/competences_service.dart___jb_tmp___: Could not find asset akepot|lib/competences_service.dart___jb_tmp___.
package:pub/src/barback/pub_package_provider.dart 110  PubPackageProvider._assertExists
package:pub/src/barback/pub_package_provider.dart 104  PubPackageProvider.getAsset.<async>

This seems like a pub/barback issue to me

oops indeed


minSdk

My minSdk is 16 and when I compile your library I got this message :
Suggestion: use a compatible library with a minSdk of at most 16, or increase this project's minSdk version to at least 19
My question is: Will I have any problems using this library with minSdk 16?
I olso change the minSdk from the sampe app to  minSdkVersion    : 14 and still works without any error messages when building project.
P.S. Nice library, thanks!

Hi, @moisoni97
You could download Spark's source code, downgrade the minSDK version and implement whole project as module to your own project. Or just fork this repo, optimize the code, and publish it to Jcenter by yourself.
In fact, I haven't test this library on devices whose SDK version are below 19, so I cannot guarantee that there is no compatibility problem. As for the reason why this library's minSDK version is so high(is it high?), see the image below.

So I gave up those devices 😂.
Thx for your  approval. Happy coding 😉!

I will close this issue now, if you have any other question, reopen it or just file another new issue. 😉!


Add Focus Magic buff to sim

The recipient of a Mage's Focus Magic receives a static 3% spell crit buff. This PR adds this buff to the sim under the "Misc" buff category.

Hey this looks great! Could you just resolve the conflicts?

Done


Statistics do not include uploads as expected

https://www.freecen.org.uk/userid_details/transcriber_statistics does not seem to be displaying the number of transcribers who have uploaded to CSVProc.

That's because it has yet to be coded; It is part of the work on #1076 and #1135
Transcriber statistics for FreeCEN have never been accumulated as part of the FC1 operations

Thanks, @Captainkirkdawson.  It will be lovely to have more transparency.

This is a copy of the first report.
You will see that we have had 104 new transcriber volunteers in the past 3 months. This is why we need to have a volunteer coordinator
The other block shows the number active on FreeCEN2 since the launch of CSVProc on 1 December 2020; just 3 months ago. One of the reasons  for the number active since then is firstly all new registrants will have been included and I expect some other transcribers will have looked at the site.
The number of people to have uploaded files is extremely encouraging at 30 transcribers and 11 coordinators and others.


⚠ GitLab Server has degraded performance

In 04bdeca, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 11743 ms

Resolved: GitLab Server performance has improved in 2f7b2e5.


Add Dialog box, and use the dialog box to show startup error

@keybase/react-hackers
This changes the notification to be a dialog box.
Preview:

The benefits of this is that:

It's isn't easy to ignore.
More room for the error message.

The cons are:

Poor ux - What does "Ok" do? does it send the log, or does it do nothing?
Sometimes we can recover from a startup error (e.g. we reconnect to the internet), so this isn't as dire as it seems

If we want to have this dialog box we should invest a bit more time in making better options for the user in the dialog box
Thoughts on this before investing any more time on it?

Make title "Keybase Error: Startup Failed".. just to make it clear it's a Keybase app error?

That's a good idea!
To be clear, I'm not planning on merging this version, this was more just to talk about it.


Building still requires manually switching DiscordGo branch

I ran go get github.com/JoshuaDoes/clinet and it ran tine until it got to the building section, which failed with the below error. Should a notice be added to the README or did something break on my end?
Build output:
$ govvv build
# _/data/data/com.termux/files/home/clinet
./cmd-info.go:124:38: member.JoinedAt.Parse undefined (type string has no field or method Parse)
./events.go:356:33: joinedAt.Parse undefined (type string has no field or method Parse)
./events.go:400:33: joinedAt.Parse undefined (type string has no field or method Parse)
./main.go:278:10: session.UpdateListeningStatus undefined (type *discordgo.Session has no field or method UpdateListeningStatus)
go tool: exit status 2```

So it appears I still can't get that issue fixed. Can you try running go mod init in the JoshuaDoes/clinet repo directory with all dependencies updated and see if you get any issues?

The automatic branch switch will not occur until a fixed go module list can be created. For the time being, you have the same error that I get when attempting to create the go module list and thus I don't believe I will be able to add go modules support to fix this issue until it gets resolved.

I've finally figured out the best way to fix it, after all this time.
As it turns out, Sirupsen/logrus is imported by multiple packages, none of which I can maintain myself, rather than sirupsen/logrus. Roughly a year and a half ago, Sirupsen renamed his GitHub account to sirupsen and dozens of packages never fixed this - mostly because, until now, case-sensitive module checking was not a thing.
The fix in commit 1c8338e was far simpler than I realized, as I've been scratching at my head for months now for one simple line:
replace github.com/Sirupsen/logrus v1.2.0 => github.com/sirupsen/logrus v1.2.0
All this time, that's all it took. I'm happy to say I can put this issue to rest, regardless of whether or not the affected packages fix it on their end or not. And with this, the re-introduction of modules support in the commit above fixes the initial issue of requiring the manual switch to the DiscordGo branch develop.

Hallelujah! 🎉


KK_MapDecal_Miraflores_7 needs adjustment

Ground clips over edge of cliff when graphics set to high.
Can be fixed by adjusting LAT/LON until clip goes away

In the file \GameData\PanoceanCanal\Miraflores\KK_MapDecal_Miraflores_7.cfg
Original Values are
	Latitude = 46.862942881249921
	Longitude = 87.787399178748686
	AbsolutOffset = -99.7679977

Corrected values are
	Latitude = 46.861774076025029
	Longitude = 87.782651727987343
	AbsolutOffset = -99.313652

Issue only appears on some PCs depending on thier Graphics settings

Adjusted KK_MapDecal_Miraflores_7 to fix video clipping
Changed Gatun base to correct ground contact issues.
Closed with release v1.0.1


Feature request: Connect using AppID, CertificateThumbPrint,TenantName

App-only is supported by i.e. following modules:

AZ
PNP.PowerShell
ExchangeOnline/Security&Compliance
Graph

Please also have this option to connect using AppID, CertificateThumbPrint and TenantName, as security-wise current token method requires a App Reg with Client Secret and a service account/user.
With the option to use an App Reg with certificate, we can remove the account requirement and just use an App. Also, this is how every other module is doing it.
This is an issue!

@joenstrup, you should open a support ticket about this so your request gets in front of the people who can actually do something about it.


Clean up MacOS platform version setting

When we merged https://github.com/ponylang/ponyc/pull/4466 to fix X86 MacOS linking, we ended up spreading the "13.0.0" minimum platform version across a number of files. As discussed on that PR, we want to clean that up and use a single define.
CMake knowledge required here.

@chalcolith can you take this one?


Fix: Change activesupport load requirement to address humanize method

Hey @tmlee, I was hoping to merge this pull request that fixes the humanize method issue. I was reading on Travis CI(https://docs.travis-ci.com/user/languages/ruby/) that the syntax for rbx-mode19 isn't supported. I also saw the following text:

Hi @drubio1989 many thanks. I have updated the master branch to pass the build.
You are right and i have ended up removing rbx from travis. I've tried with different versions of rbx based on the travis documentation and none of them work; decided to drop it.
Can you rebase from master and we can see if the build passes for this one.
What would be the consequences in your mind switching from ActiveSupport 3.2 to 4.2 in this PR?


Add end to end tests for 16B and 32B param configs

LGTM! Why have profiler enabled though?

The profiler would be useful for analyzing the performance.