Make ErrorStrings properties instead of evaluating them in cctor

While investigating the Argu performance problem described in https://github.com/fsprojects/Argu/pull/105 one of the things that was hard to optimize away was that fsharp.core!<StartupCode$FSharp-Core>.$Prim-types..cctor() is taking between 30 and 70ms to load satellite assemblies as soon as an F# application uses some specific parts of F# core (Seq.distinct in Argu case) and the reason is that LanguagePrimitives.ErrorStrings are static properties defined as let members and so they are present in the static constructor generated for the Prim-types file.
While a few dozen milliseconds aren't a problem for big applications, during startup for command lines applications that might run in hundreds of milliseconds it's a big part of their runtime. It's also one of the only case I could find where the strings are resolved in the static constructor, all other calls to SR.GetString are done directly without any caching.
The consequence for speed on a simple Argu usage can be seen here in the top left (OTHER <<mscorlib.ni!S is  OTHER <<mscorlib.ni!System.Resources.ResourceManager.GetString(...)>>) :

As the members are part of the public signature of FSharp.Core I kept the same signature (The surface area files haven't been touched).
Regarding the behavior it should be the same except that the culture used for the error messages will be the current one at the time of the call instead of whatever was the current culture when the static constructor was called (But it sounds like a bugfix to me 😉)

@vbfox for the noobs like me. can you please explain the flame graph? what are we seeing?

@forki First this flamegraph is without the optimization (As it's the one I did while measuring Argu)
Vertical axis is call stack depth, horizontal is run-time (So not clock time, things on the left didn't occur before things on the right)
The left right order is actually just time-spent, over a parent box children are organized with the one taking the longest time on the left.
So the width of the boxes give how much time they took and their height how far did the rabbit hole goes.
Two constructs are interesting to look for:

Plateau like on the top left here where a single call goes out of the app code and take a long time (GetString)
multi-candle structures where lot of small successive very deep calls accumulate (Calling reflection on a lot of small DUs here)

I think is ok. awesome work.
I tried fix it some times ago but my way (use method instead of files) introduced a regression in FSharp.Core (https://github.com/Microsoft/visualfsharp/issues/486 for fsharp.core 4.x and https://github.com/Microsoft/visualfsharp/pull/497 for fsharp.core 3.x), breaking binary compatibility.
But i used methods instead of static properties, dunno why i was sure these where static fields, not properties.
This way i think make the thing possibile do to it.
But please check these scenario so this change doesnt add a regression. issue is explained in https://github.com/Microsoft/visualfsharp/pull/694#issuecomment-149828712
Issue was, these properties get inlined into built assemblies, like for Array.last directly.

As the members are part of the public signature of FSharp.Core I kept the same signature (The surface area files haven't been touched).

AWESOME!

Regarding the behavior it should be the same except that the culture used for the error messages will be the current one at the time of the call instead of whatever was the current culture when the static constructor was called (But it sounds like a bugfix to me 😉)

it is :D fix https://github.com/Microsoft/visualfsharp/issues/159

@enricosada Didn't know this had been already tried, I'll look at the past issues and try to reproduce them.
If they can't be ""moved"" to properties (They are already properties at the assembly level but this changes a few of the attributes) I'll look at splitting the module in a separate file to get a separate static constructor.

@eiriktsarpalis I agree that the static constructors should be per-module (well per-module-per-file) I was actually surprised it wasn't the case when investigating this. Don't know why it's the case.

If they can't be ""moved"" to properties (They are already properties at the assembly level but this changes a few of the attributes) I'll look at splitting the module in a separate file to get a separate static constructor.

Last time my change was move invasive (changed to methods). maybe now is ok, i just added that comment to check the previous regressions to be sure.
Again awesome work, i think this is a real perf issue for fast console app (long running doesnt care), so a nice scenario to fix.

What is concerning is that this pops up the second time after hours of investigation ;)
We don't know how many have given up or did not sent a PR...
It would be nice if we could fix it this time :)

@vbfox alternatively you could just make the offending values lazy

I really like this change and would dearly love to take it.  However, It will break existing compiled code for example when a developer is using one of the inlined function, which expects the value to be retrieved from a field, that has been replaced by a property.
This could happen if you built against 4.1 FSharp.Core used one of the inlined functions that expects this field to exist.  And then a binding redirect updated you to a more recent FSharp.Core with this changed to a property.  You would end up with a MissingFieldException.
So this is definitely a breaking change, that would quite likely break an application.
What I suggest is that we

Keep the current module as it is, add a dirty great comment that it is purely to service inlined code in existing compiled binaries.
Add a new type that looks just like the one in this PR, with the properties.
Update all existing FSharp.Core code to use the new properties.

This would mean that we bug fix the culture issue.  And get the lazy recource load for the exact error that only occurs on an actual error.

@KevinRansom how would we feel about slapping an [<Obsolete>] attribute on the module?

Yes ... that would definitely be the right thing to do.  It would remind us not to use it :-)

@KevinRansom Theses let bindings being fields in the current version doesn't match what I'm seeing. Maybe there is something stupid that i'm missing but here is an IL DASM of FSharp.Core before my changes (<IP_ADDRESS> here) :
.method public specialname static string
        get_AddressOpNotFirstClassString() cil managed
{
  // Code size       6 (0x6)
  .maxstack  8
  IL_0000:  ldsfld     string '<StartupCode$FSharp-Core>'.'$Prim-types'::AddressOpNotFirstClassString@656
  IL_0005:  ret
} // end of method ErrorStrings::get_AddressOpNotFirstClassString

.property string AddressOpNotFirstClassString()
{
  .custom instance void Microsoft.FSharp.Core.CompilerMessageAttribute::.ctor(string,
                                                                              int32) = ...
  .custom instance void Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 )
  .get string Microsoft.FSharp.Core.LanguagePrimitives/ErrorStrings::get_AddressOpNotFirstClassString()
} // end of property ErrorStrings::AddressOpNotFirstClassString

And after:
.method public specialname static string
        get_AddressOpNotFirstClassString() cil managed
{
  // Code size       23 (0x17)
  .maxstack  8
  IL_0000:  call       class [mscorlib]System.Resources.ResourceManager Microsoft.FSharp.Core.SR::get_ResourceManager()
  IL_0005:  ldstr      "addressOpNotFirstClass"
  IL_000a:  call       class [mscorlib]System.Globalization.CultureInfo Microsoft.FSharp.Core.SR::get_Culture()
  IL_000f:  tail.
  IL_0011:  callvirt   instance string [mscorlib]System.Resources.ResourceManager::GetString(string,
                                                                                class [mscorlib]System.Globalization.CultureInfo)
  IL_0016:  ret
} // end of method ErrorStrings::get_AddressOpNotFirstClassString

.property string AddressOpNotFirstClassString()
{
  .custom instance void Microsoft.FSharp.Core.CompilerMessageAttribute::.ctor(string,
                                                                              int32) = ...
  .get string Microsoft.FSharp.Core.LanguagePrimitives/ErrorStrings::get_AddressOpNotFirstClassString()
} // end of property ErrorStrings::AddressOpNotFirstClassString

A few attributes changed because I can't use them but they are properties in both cases.
Here is part of a call to List.max compiled against <IP_ADDRESS> that was inlined :
  IL_0023:  stloc.1
  IL_0024:  ldloc.1
  IL_0025:  call       instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<!0> class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<int32>::get_TailOrNull()
  IL_002a:  brfalse.s  IL_002e
  IL_002c:  br.s       IL_003e
  IL_002e:  call       string [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/ErrorStrings::get_InputSequenceEmptyString()
  IL_0033:  ldstr      "list"
  IL_0038:  newobj     instance void [mscorlib]System.ArgumentException::.ctor(string,
                                                                               string)

Once this program was compiled I replaced FSharp.Core with my modified version and there was no problems. I it too with the exact same code compiled in VS 2015 against <IP_ADDRESS> and it also worked.

BTW it has been a property since a long time, here is FAKE 1.46 from feb 2011 build against FSharp.Core <IP_ADDRESS>
      // [267 11 - 267 107]
      IL_0046: call         string [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/ErrorStrings::get_InputSequenceEmptyString()
      IL_004b: ldstr        "source"
      IL_0050: newobj       instance void [mscorlib]System.ArgumentException::.ctor(string, string)
      IL_0055: throw
      IL_0056: nop

They are indeed static property gets, which kind of surprises me a bit, I believe that means this should work fine even for the binding redirect case

After fighting binding redirects and framework version upgrade I managed to get FAKE 1.46 running against my patched FSharp.Core and showing the error message :
G:\temp\oldfake>fake test.fsx
FakePath: .\FakeLib.dll
FAKE - F# Make - Version <IP_ADDRESS>
LocalBuild
FAKE Arguments:
("test.fsx", "1")

FSI-Path: fsi.exe
MSBuild-Path: c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
Running Buildscript: test.fsx
fsi.exe test.fsx
System.ArgumentException: The input sequence was empty.
Parameter name: source
   at Fake.TargetHelper.WriteTaskTimeSummary[a](a total) in D:\Builds\Fake\master\src\app\FakeLib\TargetHelper.fs:line 174
   at <StartupCode$FSI_0001>.$FSI_0001.main@()
Stopped due to error

---------------------------------------------------------------------
Build Time Report

@vbfox @KevinRansom We need to double check something...
You're correct that cross-module references to "module let bindings" are via property-getters.
However it's not just about IL binary compatibility. There is also the question of the F# metadata blob (containing the inline data), and whether that information carried in assemblies that have inlined references to these things, and in turn expose them, can still be correctly resolved.
The metadata blob in FSharp.Core is not an issue, since of course that is updated, but the metadata blobs in previously compiled F# libraries may contain a relevant reference.
Please test as follows:

put this code in a library lib.fs:

namespace Statistics

module Seq =
    let inline statistics x = (Seq.average x, Seq.sum x)
    let inline statisticsBy f x = (Seq.averageBy f x, Seq.sumBy f x)

Compile this library against FSharp.Core nuget package <IP_ADDRESS>

Reference the library from an application that references your new FSharp.Core at compile time containing this:

open Statistics
let stats = Seq.statistics (Seq.empty: double seq)
printfn "stats = %A" stats

If it compiles, you're ok (the inlined references coming from the optimization blob of the library have been resolved correctly).  But also check it runs and gives the exception "System.ArgumentException: The input sequence was empty" which is the string we're after

We also need to add scenarios like this as basic tests.

@dsyme thanks that's the information I was looking for about what could go wrong. I'll test that :)

Ah now I have the following error :
FSC: error FS0193: The module/namespace 'ErrorStrings' from compilation unit 'FSharp.Core' did not contain the val '{MemberParentMangledName = null; MemberIsOverride = false; LogicalName = "InputSequenceEmptyString"; TotalArgCount = 0;}'

I'll move the current module to a separate file, obsolete it and create a new version with functions instead. It'll pollute the public API a bit but it's safer.

I'll move the current module to a separate file...

Moving to a separate file might be hard because of compilation-order reasons for FSharp.Core (the first 2-3 files of FSharp.Core are sensitive in regard to this)

I'm open to suggestions :)
But I don't want to end in the "Too complex so we're slow forever because compat" slot.
Other solutions I see are :

Fake the metadata somehow so that the static-property version looks like the val version
Write the module & it's metadata entirely in IL (is it possible ?)
Change the compiler so that cctor are generated per-file-per-module instead of per-file (With the bonus that it might solve this kind of problems in other places too)
Rewrite the IL after the build to remove the cctor parts and replace the properties.

@vbfox Ah I understand now - sorry.
hmmm... the module can't be moved to a separate file because it is a nested module of LanguagePrimitives
namespace Microsoft.FSharp.Core
    ...
    module LanguagePrimitives =
        ...

        module (* internal *) ErrorStrings =
           ...

Let me think about this one.

@dsyme Thinking about it there is also a "Meh" solution to that problem, that has the advantage of being simple:
Replacing the values in this static class by their literal string equivalent in english.
Previously compiled binaries running against that version and that use one of inlined methods will get the english error message (so it's a small compat change) but it has the big advantage of being extremely simple.

Replacing the values in this static class by their literal string equivalent in english.

Maybe that in combination what @KevinRansom suggested above?

Maybe that in combination what @KevinRansom suggested above?

Yes essentially marking the current module obsolete with big comment saying just don't touch it ever, adding a new type with properties or functions, using it across the codebase :)

@dsyme Can we patch the compiler that it accepts such a IL compatible changes even when it gets old metadata? I think no-one would expect that to fail. Or is it a problem for FSharp.Core only?

@dsyme Can we patch the compiler that it accepts such a IL compatible changes even when it gets old metadata? I think no-one would expect that to fail. Or is it a problem for FSharp.Core only?

In theory yes, but FSharp.Core we publish must typically work with previous-generation F# compilers - we don't promise it, but we'd like that to be the case where possible as nuget tooling will recommend them.
I guess you should try to move all of LanguagePrimitives module into a separate file and see if the .cctor gets triggered in the cases you care about. Looking through the API of LanguagePrimitives it is things like UnboxGeneric and generic equality which will trigger it, but that's not so bad I suppose.
You might need three files - one for everything in prim-types.fs up to LanguagePrimitives, one for LanguagePrimitives, and one for the rest.
We should also add some kind of test to pin down and gradually reduce the use of startup bindings (i.e. .cctor) in FSharp.Core.  I'm annoyed with myself because I knew right from the start of F# that .cctor's was best avoided for maximum perf, but we didn't test for that and it crept back in over time.

In theory yes, but FSharp.Core we publish must typically work with previous-generation F# compilers - we don't promise it, but we'd like that to be the case where possible as nuget tooling will recommend them.

Yes I assumed that, but I also feel like we should add that change anyways in order to make it easier in the future? While I feel like it belongs to this fix/discovery we can track that in a separate issue.

Sadly generic equality is the thing that was triggering it for me.
So here is what I propose (essentially what I mentioned before)

ErrorStrings module is kept, but with english constants, and it's obsolete.
A new ErrorStringGetters module is introduced  with the methods versions
Old code that inlined the methods will work as before except that the errors strings will always be in english
New code will get the correct behavior, fixing #159
In any case the static constructor won't contain the GetString calls so they won't slow down startup

That's what I did in the new commits I pushed.

@vbfox, @dsyme
So ... MacDonalds is not a great place to think, when I got home, I had a bit more of a think and I believe this may be what you are looking for:
https://github.com/Microsoft/visualfsharp/pull/4482
All I did was turn the module into a type, and give it static members. It matches the original module well enough for the clr to load it.
You might want to try it out?
I have a little console.writeline "Hello" in there to convince myself the resource fetch didn't happen before main started.  Just print some text in main, and then provoke the error.
If hello comes up after the in main line, you know it occurred afterwards.
        type (* internal *) ErrorStrings =

            // inline functions cannot call GetString, so we must make these bits public

            static member AddressOpNotFirstClassString with get () = SR.GetString(SR.addressOpNotFirstClass)

            static member NoNegateMinValueString with get () = SR.GetString(SR.noNegateMinValue)

            // needs to be public to be visible from inline function 'average' and others

            static member InputSequenceEmptyString with get () = SR.GetString(SR.inputSequenceEmpty)

            // needs to be public to be visible from inline function 'average' and others

            static member InputArrayEmptyString with get () = System.Console.WriteLine("Hello"); SR.GetString(SR.arrayWasEmpty)

            // needs to be public to be visible from inline function 'average' and others

            static member InputMustBeNonNegativeString with get () = SR.GetString(SR.inputMustBeNonNegative)

This is the simple program I tested it with, I compiled it with the released compiler, then copied in the new FSharp.Core.dll and observed it work.
open System

[<EntryPoint>]
let main argv =
    printfn "In main"
    let x = Array.empty<float>
    printfn "%A" (Array.average x)
    0 // return an integer exit code

produces this output:
c:\kevinransom\visualfsharp>c:\users\kevinr\source\repos\ConsoleApplication12\ConsoleApplication12\bin\Debug\ConsoleApplication12.exe
In main
Hello

Unhandled Exception: System.ArgumentException: The input array was empty.
Parameter name: array
   at Program.main(String[] argv) in c:\users\kevinr\source\repos\ConsoleApplication12\ConsoleApplication12\Program.fs:line 9

c:\kevinransom\visualfsharp>

note: In Main followed by Hello.
Let me know what  you think?
Kevin

@KevinRansom The 'add a new class' approach doesn't solve the performance problem alone because the cctor is triggered for accessing anything in the file. Initialization in F# is on a file-by-file basis.
@vbfox Perhaps another approach is to use hardwired strings if the appropriate locale is English, which may be a much quicker startup check. Other locales could be similarly hardwired. The key thing would be to avoid resource cracking in the cctor I presume?

@dsyme I was assuming that localization in such an edge case (that is already buggy) wasn't so important. But yes we can hardcode all current locales not only English. The big perf problem is the IO for assembly loading. A single lookup in a table would be ok.

@dsyme Here is a version hardwiring all languages I found in the codebase :)
I tried a few solutions but as this code is really early in the compiler there aren't a lot of choice as not a lot of things are available (equality, tuples, ...)
In the end I generated a simple sequence of if without trying for any generalization.

@dsyme
Does it solve the perf issue described in the snip below for everything except error paths that use those strings?
Or is there someway these satellite assemblies and the resource groveling will happen in a non-error code path?

While investigating the Argu performance problem described in fsprojects/Argu#105 one of the things that was hard to optimize away was that fsharp.core!.$Prim-types..cctor() is taking between 30 and 70ms to load satellite assemblies as soon as an F# application uses some specific parts of F# core (Seq.distinct in Argu case) and the reason is that LanguagePrimitives.ErrorStrings are static properties defined as let members and so they are present in the static constructor generated for the Prim-types file.

@vbfox Wow, thanks
That said, my belief is we can really take the change as it was at commit 70326e7 (English-only).  The suggestion about non-English strings was really a last-resort suggestion
At that commit:

the perf problem is solved for all cases AFAICS
the error messages are always in correct languages (except for the rare case of old binaries that run as parts of apps containing a binding redirect to new FSharp.Core.dll and use inlined List.sumBy etc. code and throw one of these exceptions in a user-visible way)
binary/source compat is preserved
we don't insert a bunch of non-English strings into the source code for FSharp.Core.dll

Does it solve the perf issue described in the snip below for everything except error paths that use those strings?
Or is there someway these satellite assemblies and the resource groveling will happen in a non-error code path?

My understanding is that the PR at commit 70326e7  (or also at e3b2aeb) solves the perf problem in all non-error cases - there will be no satellite assembly loading or resource grovelling in non-error cases, for any code that runs using this FSharp.Core at runtime.

@dsyme, @vbfox
Folks, I have an alternate proposal over here: https://github.com/Microsoft/visualfsharp/pull/4503
This proposal makes a modification to the compiler, which tells it to generate a Top Value with a property but no backing field.  The compiler only does this for Values marked with the ValueAsStaticProperty attribute, and it only works when building for fsharp.core.dll.
The nice thing about this, is ther are no new API's, the inlined stuff works, and there are no scenarios when the .cctor can eagerly execute that code.  Whats more, if there are other FSharp.Core .cctor related startup issues we can use the same technique if necessary.
Let me know what you think
Kevin

@vbfox I think @KevinRansom's PR is the way to go.  It is hacking the compiler to do what we need, but using a fairly well established compiler feature  to do that.  Let's continue the discussion over there?

👍

@vbfox thanks for this work.  I learned quite a bit about inlined F# scenarios from it that I only partially understood before.  The subtlety of inlining an implementation, that itself uses inlined F# core code more or less blew my mind.
Kevin


My profile

Hello! Here is my take on your SimpleBio challenge.
Please review and merge.
Have a great day <3

It is very shameful that you did not merge these PRs during Hacktoberfest, participants used their time to make this one of their 4 PRs and it did not count at all.


No menu to open a terminal or add plugins

[Version:]1.0.86
Platform: linux 5.2.1
Plugins: altair, clickable-links, quick-cmds, relaxed-theme, save-output, scrollbar, shell-selector, theme-gruvbox, theme-hype, theme-windows10, title-control
When opening terminus 1.0.86 I don't get any menu options to open a terminal session or go to setting. Open settings with shortcut and don't have any customization code

Can you post an screenshot of how it looks like when you start the terminal?


OpenAI API key not found

Describe the bug
I have set up my OpenAI API key as follows:
os.environ["OPENAI_API_KEY"] = 'my key'
This is how it is described in the main page of the project and this is how I do with langchain and works as expected.
However, I get the follower error:
raise OpenAIKeyNotFound
ragas.exceptions.OpenAIKeyNotFound: OpenAI API key not found! Seems like your trying to use Ragas metrics with OpenAI endpoints. Please set 'OPENAI_API_KEY' environment variable

Ragas version: 0.0.20
Python version: 3.10
Why is this happening? How can I fix it?
Many thanks for creating this library and sharing it with us!

Hi Always Same Issue

@ceferisbarov Thx that works for me.

yep @ceferisbarov is right and that was a bug but has been fixed with the latest release.
please do reopen if this is still a problem

I'm facing the same issue here with the latest RAGAS version i.e. 0.0.21
Moving the RAGAS imports after setting the OpenAI API keys solved the issue for me.

thanks, I change my code to:
import os
os.environ["OPENAI_API_KEY"] = "xxxx"

from datasets import Dataset
from ragas import evaluate

than's work.
Remember to set openai key before you import rages


Charts by values

Charts by values have to be implemented:

[x] rustcore level - it should be updatable with stream (like search)
[ ] add UI part
[ ] binding to rustcore

Closed due to duplicate #1701


Submit feedback form via Javascript

Submits feedback form via Javascript so users receive confirmation without a page load. Adds check for result and message in JSON response to form submission. Also adds animated scrolling to bring notifications into view when they are updated on long forms like the one on /owning-a-home/help-us-improve.
Additions

Javascript form submit for feedback forms
Animated scrolling utilities
Styles in forms.less that ensure legends wrap on IE

Changes

Generalize EmailSignup.js so it can be used to submit any form
Check for {"result":"fail"} and error/success messaging in JSON response to form submission

Testing

Test feedback form submission on /owning-a-home/, /owning-a-home/feedback, and /owning-a-home/help-us-improve. Verify that:

Form validation runs before submit and displays notification for missing comment
Form data is correctly submitted via Javascript
Messaging is displayed on successful submit
Notification is scrolled into view if not on screen when updated

Also test email signup submit to ensure it still works correctly

It will show an error on submit locally because {result:fail} is returned, but the form submission also fails locally when Javascript is turned off

In IE, verify that legend on /owning-a-home/help-us-improve wraps correctly

Screenshots
Feedback form validation:

Feedback form success:

Email signup validation:

Email signup submit messaging:

/help-us-improve/ legend in IE11 before:

and after:

Checklist

[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows the standards laid out in the front end playbook
[ ] Passes all existing automated tests
[ ] New functions include new tests
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged
[ ] Visually tested in supported browsers and devices
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
[ ] Reviewers requested with the Assignee tool :arrow_right:

@higs4281 I just tried switching to this branch from another one and I needed to run ./setup.sh before the JS form submission would work. Sorry, that should have been in the testing instructions!

👍 smooth!

Looks good, only two things:

http://localhost:8000/owning-a-home/ says the comment is optional.

http://localhost:8000/owning-a-home/help-us-improve/ is the only form which is hidden after form submission.

@sebworks

Comment on that page is indeed optional. Just the yes/no buttons are required there.
That is the current request.

@higs4281, do you get the notification after selecting a yes / no button?

@sebworks Yes, it looks like the comment is being erroneously required there -- I'll push a fix for that. Thanks for catching it!

@sebworks good catch! I realized I was testing the live page, which allows just yes/no.

@sebworks @higs4281 Just pushed https://github.com/cfpb/cfgov-refresh/pull/2588/commits/2e02d4787eb69bf6895c4c6dafae225f0693c0eb which should fix the notification issue on the comment-optional feedback forms.

💯 , great work.

👍 error-checkk works for me.

👍

👍

Thanks, @sebworks and @higs4281!


Two-way communication with the Swift binary

We'll need two-way communication to be able to implement pause/resume recording (#28) and to fix #40. We need to use some kind of socket/IPC communication (https://github.com/wulkano/aperture/issues/8#issuecomment-277975552).

I just thought of a possible solution. We could use NSDistributedNotificationCenter to communicate between processes.
So on the Swift side we would send a notification when the Swift binary actually started recording:
DistributedNotificationCenter.default().postNotificationName(NSNotification.Name("aperture.recording"), object: nil, userInfo: ["file": url], deliverImmediately: true)

And on the Electron-side we would listen for that event:
electron.systemPreferences.subscribeNotification('aperture.recording', (event, userInfo) => {
	console.log('event', event, userInfo);
});

Which would output the following from Electron:
event aperture.recording { file: '…' }

This would work both ways. The downside is that we would need to write it specifically for Electron, so it would need to be a different mode/option in Aperture.

@albinekb @LarsJK Thoughts?

Yeah seems like a good solution to me, although I'm not too familiar with DistributedNotificationCenter or Electron..
Maybe you could use libnotify like that last article mentions as a C alternative to DistibutedNotificationCenter? Seems like there are a few node packages for libnotify..
I don't know how things like node-gyp or node-ffi works but would you be able to call functions if you made a system-module in swift?

@LarsJK Ah yeah, that's an interesting idea. I couldn't find a Node.js module for this, but shouldn't be too hard to create a simple one that interfaces libnotify using FFI.

Maybe XPC could be an alternative as well..
Haven't actually used any of these myself, so I don't know which one would be best..

Perhaps that lib could use the electron implementation if it's available? 🤔  @sindresorhus But yes, that sounds like the best solution so far.


[Removal]: Future Chocolate Seal

Hotspot Name
Future Chocolate Seal
Hotspot b58 Address
11hALTEJbWFBCSSi67tGmzYhcpY1yMG36qY71hGfJ7mHsasxoyt
Discord Handle
No response
Hotspot Manufacturer
Bobcat
Removal Reason
My hotspots is a true deployment,that can be detected or mappping at any time. I request that my my hotspots be removed from the rejected list, and I hope helium can approves it.
Modifications
No
Extra forwarders
No
Extra antennas
No
Additional Information
Here are my hotspots actual photos

admin should unban him, as all we know , china man always kind people, humble, thier heart is pure , clean soul, dont play dirty, dont lie, and naive, so  pls unban them,thanks

@abhay @molano999 @redpeople123  My hotspot has been on denylist for nearly 3 months, and now there are only 2 signals in 40 days, can you help handle my appeal? thanks!

Hi, seems all legit to me.
Please help out the people that have been put on the denylist unfairly.
Remove him please.

hey @abhay I keep reporting the unfair deny list https://github.com/helium/denylist/issues/2772 but you still do nothing to help us out of this mistake your reporting team made !!!!
You had already deleted all our HS once they were entered by mistake and now we are back in !!!
But what the hell is it, we are perfectly legal and I am one of the biggest Helium influencer in Europe, but if this is the service you do online without attention, I will have to discourage thousands of my followers from using helium.
I hope my HS are removed as soon as possible !!!
https://github.com/helium/denylist/pull/4175

If your hotspot is not a game, please wait for the review, don't harass in this way.


Add clarification to "cockroach start" docs on options for "--http-addr" parameter

Page: https://www.cockroachlabs.com/docs/v20.1/cockroach-start
Issue: When passing the --http-addr flag to the start command, it is possible to pass an option like --http-addr=:8082 which means "bind to port 8082 on my hostname".  It is also possible to pass --http-addr:<IP_ADDRESS>:8082 which means "bind to port 8082 on every IP/interface on this host".  It would be nice to have these two options explained in the docs -- especially the first one which is not intuitive and is helpful when you want to bind the Admin UI to the hostname without explicitly providing it.
I'm pretty sure the same type of syntax is valid for the --sql-addr param too.
In my testing, I find that running this command:
$ cockroach start --insecure --http-addr=:8080

Results in this running config:
root@:26257/defaultdb> select * from crdb_internal.node_runtime_info where component = 'UI' and field = 'Host';
  node_id | component | field |         value
----------+-----------+-------+-------------------------
        1 | UI        | Host  | Jims-MacBook-Pro.local

(and Jims-MacBook-Pro.local is the hostname of my machine)

Relates to #8437.


Resetting the Popup Boxes

I started using the app to create Timelapse of various satellite images and it has been very useful in understanding the spatiotemporal changes. I would like to give a suggestion that may enhance better user experience.

While drawing polygon, for each click, the lat-long popup box creates an obstacle. Each time the box needs to be closed to select the next point. Moreover, the Finish | Delete Last Point | Cancel box hides some areas. Zooming in sometimes helps in this issue, but I think shortening or realigning these two boxes can make it easier in selecting the AOI.

Thank you for the suggestion. Thank lat-lon popup has been disabled. I have no control over the Finish | Delete Last Point | Cancel box. You can use the Fullscreen button to make the map view larger if needed.


Feature discussion: unified include/exclude file

Objective
Allow users of yamlfmt to define which files to format in a file separate from the configuration, similar to gitignore_excludes. Ideally combine include and exclude into one file.
Background
I'm building a reusable CI job allowing teams to ensure that YAML files in their repository are formatted correctly. I need to give the teams the ability to exclude some files matched by the default pattern (e.g. testdata, templates) and include some additional files not matched by the default pattern (e.g. dotfiles, templates). I do not want to expose the entire yamlfmt.yaml config file to teams, because we want the formatting to be consistent across repositories.
For excludes, I am setting the following configuration in the global config file. This allows teams to define a .yamlfmtignore file in their repository to exclude certain files. This works great so far.
gitignore_path: .yamlfmtignore
gitignore_excludes: true

Allowing teams to define additional include patterns is much harder because there is no equivalent mechanism for includes. Additionally, providing any paths or patterns on the command line overwrites the include setting in the config file.
Design outline
Use one file, using gitignore syntax, to specify includes as well as excludes, using gitignore's negation syntax.
Example:
*.yaml
*.yml
/.some_tool  # File in the repository root without .yaml suffix

# Ignore testdata directories
!testdata/

There are plenty of libraries around that make implementing this easy. I've used github.com/go-git/go-git/v5/plumbing/format/gitignore in the past, but github.com/sabhiram/go-gitignore appears to also support negation.
Interaction with other config options

Introduce a new config option / flag that takes the path to the file. For example pattern_file: path/to/file (all names are stand-ins, of course). By and large this takes on the role of both the include and exclude config options.

If pattern_file and include are provided, then all include patterns are added before any patterns in pattern_file. This allows us to specify include: ['*.yaml', '*.yml'] in the config and allow exclude patterns in pattern_file to also apply to the include patterns from the config.

If pattern_file and exclude are provided, then all exclude patterns are added after any patterns in pattern_file. This allows excludes in exclude to also apply to patterns in pattern_file.
A case could be made here that all global config directives should be applied before local directives. In other words, the order include, exclude, pattern_file would be a viable alternative, allowing users to overwrite a global exclude.

Introduce a new match_type flag, which is an enum accepting standard, d[ouble]star, and gitignore. -dstar becomes an alias for -match_type=dstar.

If pattern_file and gitignore_excludes are provided, patterns from pattern_file are applied first, the resulting list of files is filtered using gitignore_path.

Alternatives considered
My current approach works somewhat, but is far from perfect:
declare -a PATTERNS=('*.yaml' '*.yml')
if [[ -e .yamlfmtextra ]]; then
  IFS=' '
  while read -r pattern; do
    PATTERNS+=("${pattern}")
  done <<<$(grep -E -v '^\s*(#|$)' .yamlfmtextra)
fi
yamlfmt -conf /etc/yamlfmt.yaml "${PATTERNS[@]}"

When you start using arrays in shell scripts, you know you're on the wrong track.

This is something that would be easier to implement if I had designed for the possibility of another matching syntax way back when. It might finally be time for me to implement versioned configs so I can start to deal with some of the less ergonomic choices I made back on day 1 of the project. 😅
To implement this in the current config, here's what I'm thinking.

Make a new match type enum with three values path, doublestar, and gitignore
When doublestar: true or -dstar are specified, the match type becomes dstar unless match type is specified
The include array becomes an array of gitignore format files
Implement a new PathCollector that uses the list of gitignore files from include to match. exclude will be ignored, since including and excluding are technically covered by the gitignore syntax itself.
Keep the gitignore_excludes functionality the way it is today. The semantics of gitignore_excludes was always that it was supplementary, and was mainly so people didn't need to double-specify excludes for things that were already gitignored.

There is probably a more ergonomic way to configure this if we could break the config, but despite being v0 still I endeavour not to do that. I will add it to my to-do list to add versioned configs, at which point this can be redesigned to be more ergonomic to configure.
Let me know if you're willing to take this on, otherwise I can try to get to it within the next couple of weeks.

It might finally be time for me to implement versioned configs so I can start to deal with some of the less ergonomic choices I made back on day 1 of the project.

I can tell the project evolved over time. I wanted to clean up the config parsing and flag handling, but got into the weeds quickly.

Let me know if you're willing to take this on, otherwise I can try to get to it within the next couple of weeks.

Initial proposal in #224. I think I covered all the points you had above. I initially used a separate pattern_file option, but have changed this to use include instead.

I wanted to clean up the config parsing and flag handling, but got into the weeds quickly.

Yeah I admit it's not great, but it's not mattered much yet; core development has largely been me alone and I perfectly understand the rat's nest of standard library flags I came up with. 😆


Ibm volumes

Description
[Describe what this change achieves]
Issues Resolved
[List any existing issues this PR resolves]
Contribution Check List

[ ] All tests pass.
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[ ] New functionality has been documented in CHANGELOG.MD

          2 Errors

:no_entry_sign:
Please add a CHANGELOG.md file

:no_entry_sign:
A README.md is required for new templates

          1 Warning

:warning:
Should this include readme changes

  Generated by :no_entry_sign: Danger


Unable to download srs file when using Android Singbox client for the first time.

This is probably because the proxy selector “auto-selector” can't determine the outbound firstly.
When I manually specify the download_detour item in the config file, it works fine.

I think you are right. The urltest may choose a wrong outbound as a download detour.
It may happen in this situation: you have a low latency outbound but it doesn't work well. The urltest will choose it as the detour but fail in the download process. Thus, you may need to double-check your outbounds.
But it works well in most of the situations. Personally, I use the Singbox client on Android with sublink-worker and have not encountered similar problems so far.
Using urltest as the selection mechanism is a trade-off. Considering that GitHub may be blocked in some time and regions, direct downloads may not always be reliable. Compared to randomly selecting an outbound node, the urltest mechanism is clearly a better solution.
If you have any ideas on how to improve this mechanism or address the potential issues, welcome your contributions. Feel free to submit a pull request or open an issue with your suggestions.

我常遇到规则下载失败，用数据流量成功率高一些。 singbox 这个设计用代理节点下载，我感觉好像有点问题

I think you are right. The urltest may choose a wrong outbound as a download detour.
It may happen in this situation: you have a low latency outbound but it doesn't work well. The urltest will choose it as the detour but fail in the download process. Thus, you may need to double-check your outbounds.
But it works well in most of the situations. Personally, I use the Singbox client on Android with sublink-worker and have not encountered similar problems so far.
Using urltest as the selection mechanism is a trade-off. Considering that GitHub may be blocked in some time and regions, direct downloads may not always be reliable. Compared to randomly selecting an outbound node, the urltest mechanism is clearly a better solution.
If you have any ideas on how to improve this mechanism or address the potential issues, welcome your contributions. Feel free to submit a pull request or open an issue with your suggestions.

I think there might be two potential ways to address this instability issue.
First, if user has a stable and reliable outbound, perhaps they could manually specify that outbound for downloading rules. Alternatively, if the user doesn't have it, they could use a public GitHub reverse proxy to download the rules.
In simple terms, this approach allows users to specify an outbound for downloading rules and a public proxy to download the rules. User need to have at least one reliable outbound or a network environment capable of directly accessing the public reverse proxy.
Personally, I lean more towards the second approach. If a user can successfully use this project and get the subscription, it at least shows their network environment can connect directly to CF worker. Perhaps integrating a reverse proxy for rules link within the project could be considered, allowing users to download rules through the reverse proxy established by the project itself. This might be more convenient for the user.
However, the second method seems quite heavy and may not be what a subscription converter should handle. Maybe you could think about how you want to position this project before making a decision.
Since I've only just started using Singbox and have experience only with the Android client, I'm not sure if this issue is caused by the subscription file or by Singbox's design.
Thank you very much for your efforts and for creating this open-source project—it’s truly excellent. The PR I submitted earlier was merely an attempt to imitate your clear code, though not as skillfully. Given my current abilities, I may not be able to implement the second approach I mentioned anytime soon.
Thanks again for all your efforts.

我常遇到规则下载失败，用数据流量成功率高一些。 singbox 这个设计用代理节点下载，我感觉好像有点问题

我发现首次规则集下载困难是因为走的直连，配置里指定自动选择组代理下载似乎并没有生效，

我常遇到规则下载失败，用数据流量成功率高一些。 singbox 这个设计用代理节点下载，我感觉好像有点问题

我发现首次规则集下载困难是因为走的直连，配置里指定自动选择组代理下载似乎并没有生效，

你提供的链接好像不是下载规则集的地址，这部分应该是内核在初始化，下载规则集的日志应该在后面？

这部分可能是下载 external_ui 的部分？
https://sing-box.sagernet.org/zh/configuration/experimental/clash-api/#_1
抱歉，我其实一知半解。
我用另外一个项目生成的配置就能轻松下载规则并启动，您或许可以参考一下https://cconfig.cc/nodes

这部分可能是下载 external_ui 的部分？ https://sing-box.sagernet.org/zh/configuration/experimental/clash-api/#_1
抱歉，我其实一知半解。
我用另外一个项目生成的配置就能轻松下载规则并启动，您或许可以参考一下https://cconfig.cc/nodes

当然，我其实也不太了解sing-box的具体运作
晚点有时间我看看

参考jaydong2016提出的 #55 目前似乎解决了问题


Feature/il 222/favourites

Create separate store for favourites with add, remove and fetch functions.
Create toggling empty and full favourites with redirection to home page and log in empty favourites.

@iakivpekarskyi, please, pull changes from the development branch


Repo migration is not working in the new version 1.14.1

Gitea version (or commit ref): 1.14.1
Git version: 2.30.2
Operating system: GNU/Linux Alpine 3.13.5
We are using the official docker image in k8s:

image:
    repository: gitea/gitea
    tag: 1.14.1

Database (use [x]):

[x] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[x] No

Log gist:

The gitea container is logging this:
 2021/04/21 14:39:54 Started POST /api/v1/repos/migrate for <IP_ADDRESS>:32768
 2021/04/21 14:39:54 Completed POST /api/v1/repos/migrate 409 Conflict in 37.199026ms

Description

We are creating a new migration from a public github.com repository using the API /api/v1/repos/migrate

The API is returning the following error:
422 Unprocessable Entity

Migration failed: Clone: exit status 128 - fatal: unable to access 'https://github.com/go-gitea/gitea.git/': Could not resolve host: github.com

If we try to connect with github from the gitea instance, it fails:
# curl -vv https://github.com
* Could not resolve host: github.com
* Closing connection 0
curl: (6) Could not resolve host: github.com

The OS that is using the gitea docker image is:
# cat /etc/alpine-release
3.13.5

Could be it related to https://github.com/gliderlabs/docker-alpine/issues/539?

Is this still a problem?

I have tested the new version 1.14.2 and the problem persists:
Could not resolve host: github.com


Dependabot alerts won't clear after update

Package ecosystem
bundler
Package manager version
bundler 2.3.11 (also tried with 2.3.6)
Language version
ruby 3.1.1, 3.1.2
Manifest location and content prior to update
/Gemfile in standard root location
Private repo, but here's the relevant snippet
    nokogiri (1.13.4)
      mini_portile2 (~> 2.8.0)
      racc (~> 1.4)
    nokogiri (1.13.4-arm64-darwin)
      racc (~> 1.4)
    nokogiri (1.13.4-x86_64-darwin)
      racc (~> 1.4)
    nokogiri (1.13.4-x86_64-linux)
      racc (~> 1.4)

dependabot.yml content
N/A. Never configured a dependabot.yml file
Updated dependency
nokogiri, from 1.13.3 to 1.13.4
What you expected to see, versus what you actually saw
I expected the security banner to disappear once I merged the dependency update into my default branch
The security banner did not disappear once I merged the dependency update into my default branch. It's been almost 6 days and I've also tried:

Rolling back to a vulnerable version & doing a new pull request/merge with the patch
Upgrading bundler & ruby versions

I also observe the graphql API showing these vulnerabilities as existing, when they do not.
Native package manager behavior
When I run bundle audit check --update locally & as a CI step, no vulnerabilities are present.
Images of the diff or a link to the PR, issue or logs
Security banner:

Actual alert (and merged in PR)

Github action where we also run bundle audit:

🕹 Bonus points: Smallest manifest that reproduces the issue
Unable to reproduce this on new/other repos, however:
This is happening on ~6 of our private repos that all have slightly different configs (one has sidekiq enterprise, for example. One has a private library referenced. Some are only public gems)

I run into the same thing with the latest nokogiri security update. I thought it was maybe related to a single gem update solving 2 different security vulnerabilities. Anyways, I cleared the alerts manually (reporting "Alert is inaccurate or incorrect") and moved on. But I will report back if it happens again.

Anyways, I cleared the alerts manually (reporting "Alert is inaccurate or incorrect") and moved on.

I did not know this was a feature, so thanks for pointing that out. Previously, we shied away from dismissing alerts because we noticed that when we had regressions (from a bad merge conflict, for example, where we patched it and then it was re-opened) the alert never got "re-triggered".
Being able to classify the alert dismissal is pretty useful though so I'll give te bhat a try again.
Will use that as a workaround for this instant issue but will leave this issue open (hopefully) because it sounds like it's not intended behavior.

I have a similar issue (I think it is related to this issue).
In my case the alerts where cleared, but Dependabot still shows a warning in "Dependency graph".
The info says patches versions 1.10.22, 2.0.13 and 1.10.23, 2.1.9, and my depencies are now "^1.10.23 || ^2.1.9" so the issue should be fixed see here

I have the same in one my repos which is public, here it is if it helps for debugging :)
https://github.com/renatolond/mastodon-twitter-poster

I'm going to close this issue as the original issue has been worked around, and this is now becoming a catch-all issue. Unfortunately catch-call issues aren't really helpful because while the symptoms may be similar, the root cause may be entirely different.
My guess is that the majority of these issues are caching issues which have likely cleared by now, but if for some reason you're still seeing issues, please open a new issue and be sure to include a link to your repo. If it's a private repo, then open a support ticket.

I had a similar problem, that merged PRs were showing next to open dependabot alerts, which is confusing. However, when I looked at the details of the alerts I found that the alert was reopened after having been closed once, which explained why a merged PR can be shown next to an open alert.

In the details one can also see which exact PR reintroduced the vulnerable dependency.
Indicating this more clearly in the overview that the alert was reopened would make it less confusing though.

@JarnoRFB per the comment right above yours:

...this is now becoming a catch-all issue. Unfortunately catch-call issues aren't really helpful because while the symptoms may be similar, the root cause may be entirely different... if for some reason you're still seeing issues, please open a new issue and be sure to include a link to your repo. If it's a private repo, then open a support ticket.

I'm going to lock this issue to prevent similar follow-on comments. Please file new issues instead.

@JarnoRFB my apologies, I just re-read your comment, and I see you were helpfully trying to provide clarity here, you weren't actually raising a new issue.
Sorry for my misreading of your helpful comment, and thank you for the helpful screenshot.
I'm going to unlock this, but again, anyone with an actual issue, please file a new issue instead of tagging onto this issue.


Fix application locks on older macOS versions

On older versions of macOS, Vienna locks at launch and displays the
beachball cursor.
I noticed the problem first on an OS X 10.11 (El Capitan) virtual machine.
It persists on macOS 10.12 (Sierra).
I refactored handleNavigationEndRss because the waitForAsyncExecution
helper looked overly complex to me.
Issue #1502

I'd like to completely get rid of the AsyncHelper code, but the evaluateScrollPossibilities() function is tricky…

The asyncHelper encapsulates the working way of waiting for an asynchronously executed completion block. I built it for another project (a swift playground) after realizing the pattern repeated itself and was tricky to get right.
The reason for a deadlock can only be that the execution block is scheduled on the same thread where it was instantiated and which is waiting for its completion. Of course there could be more complex deadlocks, but in this scenario I believe there are not.
That means, in older OSX Versions, there is some issue with the scheduling.
If possible, log the thread name or number or at least whether it is the main thread before calling waitForAsyncExecution to really find the issue.

The method allows for a queue to be passed into the block. If you know on which queue the block is instantiated, you can choose a separate queue to schedule it.
I know all of this needs some documentation. I will add some as soon as possible.

Also, you could pass a timeout if the block is not called reliably on older OSes.

Sorry, seems that I was wrong about the timeout. But it's probably possible to be built in. However, I just saw that I built a facility to set two queues: one where the task is scheduled and one where the execution block runs. If both are distinct from the queue where the asyncHelper code is called, provided the completion block is executed, there should be no problem. I would suggest experimenting with those options before removing asyncHelper and inlining its functionality

You don't really have a choice here, as evaluateJavaScript can only run on main queue.

I have verified that the executing queue  and the waiting queue are distinct.
Apparently, the problem is that both queues need to access the same (main) thread: running process is launched by ViewDidLoad, while waiting process needs to perform some evaluateJavaScript.
I am wondering if it would it be possible (and useful) to use DispatchGroup's notify rather than wait in AsyncHelper…

I am not opposed to keeping AsyncHelper in the code base, but I doubt it will be a solution for all situations. Clearly, we met an edge case that it cannot handle.
The ideal solution would be to use the Async/Await scheme introduced by Swift 5.5, but it currently supports macOS 12 only and will probably not go back further than macOS 10.15.
There are alternatives like AwaitKit or PromiseKit, but adding such dependencies seems overkill to me.
To me, this pull request in its current state remains the most reasonable solution for tackling with issue #1502.

Here is a screenshot illustrating logging code added to AsyncHelper:

and this is the logging code added to BrowserTab+RSSSource:

On BigSur, you will have sequences like this in your log :
2021-10-07 22:19:30.817004+0300 Vienna[2980:32981] BJR - will submit async block
2021-10-07 22:19:30.817069+0300 Vienna[2980:32981] BJR - will enter CFRunLoopRun
2021-10-07 22:19:30.817087+0300 Vienna[2980:33345] BJR - will enter group.wait()
2021-10-07 22:19:30.817141+0300 Vienna[2980:32981] BJR - will enter evaluateJavaScript
2021-10-07 22:19:30.818575+0300 Vienna[2980:32981] BJR - got JavaScript result
2021-10-07 22:19:30.818708+0300 Vienna[2980:33345] BJR - didFinish - will enter CFRunLoopPerformBlock
2021-10-07 22:19:30.818756+0300 Vienna[2980:33345] BJR - will enter CFRunLoopWakeUp

while on macOS Sierra, you will notice things like this on locks:
par défaut	22:17:23.837196 +0300	Vienna	BJR - will submit async block
par défaut	22:17:23.837535 +0300	Vienna	BJR - will enter CFRunLoopRun
par défaut	22:17:23.846706 +0300	Vienna	BJR - will enter group.wait()
par défaut	22:17:23.952988 +0300	Vienna	BJR - will enter evaluateJavaScript
par défaut	22:17:24.003407 +0300	Vienna	BJR - will submit async block
par défaut	22:17:24.003524 +0300	Vienna	BJR - will enter CFRunLoopRun
par défaut	22:17:24.003943 +0300	Vienna	BJR - will enter group.wait()
par défaut	22:17:24.004902 +0300	Vienna	BJR - will enter evaluateJavaScript

which show that the loop calling CFRunLoopRun is reached, but on macOS Sierra, a lock occurs before or during the JavaScript and its result is not obtained.
Yes, there are similarities between AsyncHelper and my code, but some notable difference are:

my code uses group.notify(queue: DispatchQueue.main{ ... } instead of group.wait()
my code directly calls evaluateJavaScript instead of invoking DispatchQueue.async

In the Sierra example, is the code run twice for some reason?
Secondly, does the JS fail on Sierra for some reason? The WebKit API and Safari JS evaluation were different back then... Maybe the callback was not reliable?
A timeout parameter for waitForAsyncExecution which we could pass to the wait function would be no mistake.
Also, we could write an additional utility function that works in the way that you synchronized the callback. I am uncomfortable of having calls to dispatch groups for synchronization anywhere in the usual code, a reader would always have to think about how all that works way too much.
Thirdly, I am not even sure that we can't just execute the callback to updateAddressBarButtons in the JS result callback. I think I was concerned about asynchronous actions in the browser causing corrupted interface state (an rss button when it should not be there for example), but honestly that's not a big issue.
Lastly, I think the updateAddressBarButtons method should remain in the BrowserTab class in case more toolbar buttons are added.

One possibly related observation : I noticed that WKWebViews are heavily reused and recycled by the system. When you browse into multiple folder and articles, CustowWKWebView's init is rarely called.
So this may explain why I see the code called twice or more for the same webview.

The article WKWebView is indeed reused all the time. Is the previous load stopped when opening a new article?

I am unable to correctly assess this.


Strip STATIC_URL from start of path to avoid SuspiciousFileOperation during embed

With embed enabled, I was running into SuspicousFileOperation exceptions seemingly due to the /static/ at the start of the asset path.
    content = compress(paths, **kwargs)
  File "/home/richard/work/DE/heartbeat/env/src/django-pipeline/pipeline/compressors/__init__.py", line 73, in compress_css
    css = self.concatenate_and_rewrite(paths, output_filename, variant)
  File "/home/richard/work/DE/heartbeat/env/src/django-pipeline/pipeline/compressors/__init__.py", line 139, in concatenate_and_rewrite
    content = re.sub(URL_DETECTOR, reconstruct, content)
  File "/home/richard/work/DE/heartbeat/env/lib/python2.7/re.py", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/home/richard/work/DE/heartbeat/env/src/django-pipeline/pipeline/compressors/__init__.py", line 135, in reconstruct
    output_filename, variant)
  File "/home/richard/work/DE/heartbeat/env/src/django-pipeline/pipeline/compressors/__init__.py", line 150, in construct_asset_path
    if self.embeddable(public_path, variant):
  File "/home/richard/work/DE/heartbeat/env/src/django-pipeline/pipeline/compressors/__init__.py", line 162, in embeddable
    if not (re.search(settings.PIPELINE_EMBED_PATH, path.replace('\\', '/')) and self.storage.exists(path)):
  File "/home/richard/work/DE/heartbeat/env/local/lib/python2.7/site-packages/django/core/files/storage.py", line 265, in exists
    return os.path.exists(self.path(name))
  File "/home/richard/work/DE/heartbeat/env/local/lib/python2.7/site-packages/django/contrib/staticfiles/storage.py", line 48, in path
    return super(StaticFilesStorage, self).path(name)
  File "/home/richard/work/DE/heartbeat/env/local/lib/python2.7/site-packages/django/core/files/storage.py", line 281, in path
    raise SuspiciousFileOperation("Attempted access to '%s' denied." % name)
django.core.exceptions.SuspiciousFileOperation: Attempted access to '/static/img/logo.png' denied.

This occurs regardless of whether I reference the asset using a relative url i.e. img/logo.png or an absolute url /static/img/logo.png in my LESS file.
I'm not sure if I'm doing something wrong, but stripping the STATIC_URL from paths prior to storage.exists() lookups  appears to resolve it.

Does https://github.com/jazzband/django-pipeline/commit/930b12c9307e69cab05ec360efc2714fe008fc21 solve this?


Warn logs at the server startup

We can observe the logs as below which are at warn level. Need to get rid of them.
2018-05-22 18:15:20,360]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.executor.function.InstanceOfBooleanFunctionExecutor' as 'class org.wso2.siddhi.core.executor.function.InstanceOfBooleanFunctionExecutor' was already loaded with the same name 'instanceOfBoolean'
[2018-05-22 18:15:20,360]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.processor.stream.window.LengthWindowProcessor' as 'class org.wso2.siddhi.core.query.processor.stream.window.LengthWindowProcessor' was already loaded with the same name 'length'
[2018-05-22 18:15:20,360]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.processor.stream.window.CronWindowProcessor' as 'class org.wso2.siddhi.core.query.processor.stream.window.CronWindowProcessor' was already loaded with the same name 'cron'
[2018-05-22 18:15:20,361]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.executor.function.MaximumFunctionExecutor' as 'class org.wso2.siddhi.core.executor.function.MaximumFunctionExecutor' was already loaded with the same name 'maximum'
[2018-05-22 18:15:20,361]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.MaxAttributeAggregator' as 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.MaxAttributeAggregator' was already loaded with the same name 'max'
[2018-05-22 18:15:20,361]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.processor.stream.function.Pol2CartStreamFunctionProcessor' as 'class org.wso2.siddhi.core.query.processor.stream.function.Pol2CartStreamFunctionProcessor' was already loaded with the same name 'pol2Cart'
[2018-05-22 18:15:20,361]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.executor.function.DefaultFunctionExecutor' as 'class org.wso2.siddhi.core.executor.function.DefaultFunctionExecutor' was already loaded with the same name 'default'
[2018-05-22 18:15:20,361]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.MinAttributeAggregator' as 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.MinAttributeAggregator' was already loaded with the same name 'min'
[2018-05-22 18:15:20,361]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.executor.function.InstanceOfStringFunctionExecutor' as 'class org.wso2.siddhi.core.executor.function.InstanceOfStringFunctionExecutor' was already loaded with the same name 'instanceOfString'
[2018-05-22 18:15:20,361]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.executor.function.CoalesceFunctionExecutor' as 'class org.wso2.siddhi.core.executor.function.CoalesceFunctionExecutor' was already loaded with the same name 'coalesce'
[2018-05-22 18:15:20,362]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.processor.stream.window.FrequentWindowProcessor' as 'class org.wso2.siddhi.core.query.processor.stream.window.FrequentWindowProcessor' was already loaded with the same name 'frequent'
[2018-05-22 18:15:20,362]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.CountAttributeAggregator' as 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.CountAttributeAggregator' was already loaded with the same name 'count'
[2018-05-22 18:15:20,362]  WARN {org.wso2.siddhi.core.util.SiddhiExtensionLoader} -  Dropping extension 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.DistinctCountAttributeAggregator' as 'class org.wso2.siddhi.core.query.selector.attribute.aggregator.DistinctCountAttributeAggregator' was already loaded with the same name 'distinctCount'

This was resolved by removing the siddhi runtime from IS


THttpClient: Could not read xx bytes from sandbox.evernote.com:443//edam/user

I'm having problem instantiating evernote cloud API client. I get the following exception dump (original lib and root path are replaced)
Uncaught TTransportException: exception 'TTransportException' with message 'THttpClient: Could not read<PHONE_NUMBER> bytes from sandbox.evernote.com:443//edam/user' in /php_lib_path/evernote/transport/THttpClient.php:156
Stack trace:
#0 /php_lib_path/evernote/transport/TTransport.php(87): THttpClient->read(1013476926)
#1 /php_lib_path/evernote/protocol/TBinaryProtocol.php(207): TTransport->readAll(1013478509)
#2 /php_lib_path/evernote/packages/UserStore/UserStore.php(75): TBinaryProtocol->readMessageBegin(NULL, 0, 0)
#3 /php_lib_path/evernote/packages/UserStore/UserStore.php(42): EDAM\UserStore\UserStoreClient->recv_checkVersion()
#4 [internal function]: EDAM\UserStore\UserStoreClient->checkVersion('Evernote EDAMTe...', 1, 25)
#5 /php_lib_path/evernote/Evernote/Client.php(142): ReflectionMethod->invokeArgs(Object(EDAM\UserStore\UserStoreClient), Array)
#6 /wwwroot/evernote/EDAMTest.php(66): Evernote\Store->__call('checkVersion', Array)
#7 /wwwroot/evernote/EDAMTest.php(66): Evernote\Store->checkVersion('Evernote EDAMTe...', 1, 25)
#8 {main}

I have tested that the script works on my local environment. And in this testing environment, I have double checked that
1- OpenSSL is open and PHP support is enabled and supported
2- Trying to connect to evernote production environment (with sandbox => false) also failed

same error here


Call to method nil? on unconstrained generic type T.type_parameter(:T)

Input
→ View on sorbet.run
 # typed: strict
extend T::Sig

sig do
  type_parameters(:T)
  .params(k: Symbol, v: T.type_parameter(:T))
  .void
end
def add(k, v)
  unless v.nil?
    # add to hash
  end
end

Observed output
editor.rb:10: Call to method nil? on unconstrained generic type T.type_parameter(:T) (of Object#add) https://srb.help/7038
    10 |  unless v.nil?
                   ^^^^
  Got T.type_parameter(:T) (of Object#add) originating from:
    editor.rb:9:
     9 |def add(k, v)
                   ^
Errors: 1

Expected behavior
No error. Some recent change in the last week or so has made this stop type checking, where it had been fine before. I haven't figured out exactly which commit introduced this type checking error.
Basic methods such as nil? that are on Object should be allowed for type parameters, as they are on every object.

This is expected, the same as calls to is_a?, and the same as snippets like this:
https://sorbet.run/#%23 typed%3A true
extend T%3A%3ASig

module M
end

sig {params(x%3A M).void}
def foo(x)
  puts(x.nil%3F)
  puts(x.is_a%3F(NilClass))
end
The workaround is to do one of these things:

use T.all(Kernel, T.type_parameter(:U)) instead
use case x when NilClass

https://github.com/sorbet/sorbet/pull/5305 is the PR

Thanks for the workarounds


Introduction about NP-HARD/NP-COMPLETE problems

Is your feature request related to a problem? Please describe.
I would like to mention about np problems. What are they, how it is important etc?

This repository is for algorithm and not for lecture notes


Add Ballista support to DataFusion CLI

Which issue does this PR close?

Closes #886 .
$ ./target/release/datafusion-cli --host localhost --port 50050
DataFusion CLI v4.0.0-SNAPSHOT

> create external table lineitem stored as parquet location '/mnt/tpch/parquet-sf100-partitioned/lineitem';
0 rows in set. Query took 0.015 seconds.

> select
    l_returnflag,
    l_linestatus,
    sum(l_quantity) as sum_qty,
    sum(l_extendedprice) as sum_base_price,
    sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
    sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
    avg(l_quantity) as avg_qty,
    avg(l_extendedprice) as avg_price,
    avg(l_discount) as avg_disc,
    count(*) as count_order
from
    lineitem
where
        l_shipdate <= date '1998-09-02'
group by
    l_returnflag,
    l_linestatus
order by
    l_returnflag,
    l_linestatus;
+--------------+--------------+------------+--------------------+--------------------+-------------------+--------------------+--------------------+----------------------+-------------+
| l_returnflag | l_linestatus | sum_qty    | sum_base_price     | sum_disc_price     | sum_charge        | avg_qty            | avg_price          | avg_disc             | count_order |
+--------------+--------------+------------+--------------------+--------------------+-------------------+--------------------+--------------------+----------------------+-------------+
| A            | F            |<PHONE_NUMBER> |<PHONE_NUMBER>194.456  |<PHONE_NUMBER>183.934  |<PHONE_NUMBER>515.928 | 25.499370423275426 | 38236.116984304936 | 0.05000224353092895  | 148047881   |
| N            | F            | 98553062   |<PHONE_NUMBER>85.9801  |<PHONE_NUMBER>65.03497 |<PHONE_NUMBER>32.7757 | 25.501556956882876 | 38237.19938880453  | 0.049985284338054006 | 3864590     |
| N            | O            |<PHONE_NUMBER> |<PHONE_NUMBER>8169.863 |<PHONE_NUMBER>6359.283 |<PHONE_NUMBER>5670.58 | 25.500009433521782 | 38237.227663621445 | 0.0499979183499098   | 291619616   |
| R            | F            |<PHONE_NUMBER> |<PHONE_NUMBER>745.348  |<PHONE_NUMBER>915.405  |<PHONE_NUMBER>666.917 | 25.50006628406532  | 38236.697258453016 | 0.050001304339654135 | 148067261   |
+--------------+--------------+------------+--------------------+--------------------+-------------------+--------------------+--------------------+----------------------+-------------+
4 rows in set. Query took 8.677 seconds.

Rationale for this change

Enables a SQL repl for Ballista with minimal effort.
What changes are included in this PR?

datafusion-cli now has new host and port arguments
Are there any user-facing changes?

No

looks like code blocks in readme needs to be marked with no_run

my bad, no_run still compiles the code, we would need to use ignore here :(

Sorry that I've been quite busy these days. Will review by end of the week and also see what else i can contribute to. This is exciting!


Fix: vela status print wrong STATUS

Signed-off-by: StevenLeiZhang<EMAIL_ADDRESS>Description of your changes

Fixes #4238
Before:
➜  chart vela -n vela-system status addon-terraform -t
CLUSTER       NAMESPACE       RESOURCE                            STATUS
local     ─┬─ vela-system ─┬─ HelmRelease/terraform-controller    updated
           │               └─ HelmRepository/terraform-controller updated
           └─ -           ─── -                                   not-deployed

After:
➜  bin git:(master) ✗ ./vela -n vela-system status addon-terraform -t
CLUSTER       NAMESPACE       RESOURCE                            STATUS
local     ─── vela-system ─┬─ HelmRelease/terraform-controller    updated
                           └─ HelmRepository/terraform-controller updated

I have:

[ ] Read and followed KubeVela's contribution process.
[ ] Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
[ ] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

Cool! Try to run make reviewable again?

Done


Update navicat-premium-essentials to 11.2.15

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

Merged as eee558dc60649406012774a357b8b6eb62674f7b.


Refactor PipelineRun and Run yamls in conversion_test to avoid flake

Changes

This commit refactors the yamls in the conversion test to aovid flake
where the TaskRun and the PipelineRun could run forever:

remove the resources related codes
change the workspace usage that are not present
updates the params specifications

fixes: https://github.com/tektoncd/pipeline/issues/6672
/kind misc
Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[n/a] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
[x] Has Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including functionality, content, code)
[x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[n/a] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
[n/a] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
NONE

This seems to me that it has been timed out for waiting in 60s if I am not mistaken by the last part of the logs

Sure, that's a good start but we should look into why the pipeline is timing out waiting for 60s - the actual task only seems to echo hello so its really weird that it will take a entire minute to finish running.
Some other oddities I noticed in the pipeline is that we are referencing a workspace with a secret but that is never used (is the secret even present?). Also, some of the tasks/pipelines have references to pipeline resources - shouldn't they fail to get created?

This seems to me that it has been timed out for waiting in 60s if I am not mistaken by the last part of the logs

Sure, that's a good start but we should look into why the pipeline is timing out waiting for 60s - the actual task only seems to echo hello so its really weird that it will take a entire minute to finish running.
Some other oddities I noticed in the pipeline is that we are referencing a workspace with a secret but that is never used (is the secret even present?). Also, some of the tasks/pipelines have references to pipeline resources - shouldn't they fail to get created?

Thanks @dibyom , I've updated the PR, I've mistaken that it could be longer than 60s while having the previous functionalities before we remove all the resources. I have validated the taskrun and pipelineruns yaml respectively.

/lgtm


Is there a way to get the individual segments?

Hello!
Is there a way to save the individual segments as separate meshes?
Thanks!

Hi, you can amend this function, to output different meshes based on the face labels
https://github.com/clinplayer/SEG-MAT/blob/400ee4d6901987606c542219ff93a2d3cc44c049/src/Decomposer.cpp#L35
You can also try to use the colors of the output mesh to categorize the face triangles, here is a simple code with Python. Note it is for obj and you can slightly change it to adapt the off format.
import numpy as np
import trimesh
def process_obj(filename):
    mesh = trimesh.load_mesh(filename)
    vertex_colors = np.array(mesh.visual.vertex_colors)
    vertex_colors = np.round(vertex_colors).astype(int)
    face_classes = []
    # For each face, finds its category id
    for face in mesh.faces:
        face_color = vertex_colors[face[0]]
        face_class = None
        for i, c in enumerate(face_classes):
            if np.array_equal(c, face_color):
                face_class = i
                break
        if face_class is None:
            face_classes.append(face_color)
            face_class = len(face_classes) - 1

Awesome, thanks!
Also, does the qmat code have a command line interface? I can't seem to find one in the source.

I'm afraid not. But you can download the source code provided by the author and convert it to command line interface
https://binwangthss.github.io/qmat/qmat.html

Hi! Just following up on this issue, was anyone able to export the different meshes?


fix any abi fail

Description

Added a timeout for anyabi so that it fixes current issue
used useQuery for fetching data so that we cache request and don't make same request when going from home page => contract address page

Ohh I think I know why some of the test are failing, will update it soon

Seem like Parex chain is rpc down that's why the last test seems to fail :/

https://chainlist.org/chain/322202
Will update that test to consider different chain


make part 2

host complete - now just need to make part 2

document is here: https://github.com/ahujaesh/birthday-card where im working on part 2

nvm see #6a26305f5355acb286820bc62dba2c612b9afe19


added a convoluted neural net

@marcusmolchany lemme know what you think

smh

this is cool, but if you took even a second to familiarize yourself with the project you'd know that all commit messages are present tense. your flippancy will not get you very far

@devspinn wow punctuation much?


ComponentContainer: link in Overview description broken

Open https://openui5nightly.hana.ondemand.com/api/sap.ui.core.ComponentContainer

It says:

See also sap.ui.core.ComponentSupport.

Click on the link.

Thank you for the PR, fixed.


Features to add to Polls

Frontend:

[x] Bugfix: Checkboxes options are not displayed.
[x] Bugfix: Radio button options are not clickable.
[x] Bugfix: Display custom description that was set in admin backend
[x] Bugfix: Display custom thank you message that was set in admin backend rather than generic "THANK YOU FOR YOUR
RESPONSE!" message
[x] If a poll has the option set to display totals rather than percentages, don't put a '%'-sign after the totals.
Support for "(single) Checkbox" fields. They currently crash the page upon submitting. Now in #339
[x] When input type "checkbox" is set as "required" in the backend, when submitting, the error message "This field is required." is displayed regardless of whether it is checked or not, making it impossible to complete the survey.
[x] When input type "checkbox" is set as "required" in the backend, the info text is "CHECK ALL THAT APPLY".
 Should be removed.

Backend:

Now #360
[x] Support for anonymous submission (if specified in the backend).

Everything remaining is part of a new issue now.


Asus AiProtection breaks Home Assistant Startup

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.64
Python release (python3 --version):
3.6?
Component/platform:
Asuswrt
Description of problem:
I Accidentally enabled Asus AiProtection, and when rebooting HA later on, it never started up, at least not the frontend. Took me a while to figure out the problem was due to AiProtection - disabling it or commenting out asuswrt from configuration.yaml fixed the issue.
Expected:
Expected an error message off some kind, not a full-on crash.
Problem-relevant configuration.yaml entries and steps to reproduce:

  device_tracker:
     - platform: asuswrt
       host: <IP_ADDRESS>
       username: admin
       password: !secret router_password
       consider_home: 120
       track_new_devices: no
       protocol: telnet

Enable AiProtection (Asus AC-RT68U) or just press "Open" in the mobile app under Insight-->Security Insight

Reboot Home Assistant

Traceback (if applicable):

Additional info:
Used Hassbian at the time, so not completely sure on HA version or PY version.
Also, when troubleshooting, i tried to rename configuration.yaml to configuration_old.yaml, which caused HA to make a new config, which also overwrote all other standard .yaml files like secrets.yaml, automations.yaml and so on. This should also not happen.

That would most likely be the AiProtection's "Infected Device Prevention and Blocking" feature that is blocking your HA device completely. It has nothing to do with the device_tracker: platform.
 It would be virtually impossible for HA team to create walk-through for router settings even only for major brands, each user has to set this up themselves.
This is not a bug with HA, this is configuration issue of your environment.
About the config cleaning on lack of default configuration.yaml when starting HA - this was already reported, I can't seem to find it to link it here atm.

If you mean that AiProtection is blocking HA completly on my network, I think that is weird, as HA started as soon as i commented out the device_tracker platform, while AiProtection was still activated on my router.

Never tested AiProtection, but knowing the router specs, my educated guess would be that the fact HA was querying router x times per minute would trigger "protection" mechanism, that would be blocking any packages from HA.
There isnt any magical "AiProtection didnt allow HA to start" happening. Its just blocking or not a device/service inside your network (i assume it is your main router).


Various JSON and core benefit updates

Use line braks in some JSON sql examples.
Cross-reference the JSON tutorial.
Update the See Also list in core benefit tutorials.

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/d14d7061cd197484c1fd14405b1f298f35846414/

 thanks for updating!

Review status: 0 of 15 files reviewed at latest revision, all discussions resolved, all commit checks successful.

Comments from Reviewable

Thanks, @lhirata.


Tons of dependencies ... are they all needed?

Adding slick-lightbox to my project made my npm production dependencies balloon up from about 10 to what looks like over 100? Is there any reason why this simple lightbox requires so many prouction dependencies ? Is it possible to clean that up?

All of the dependencies are inside of devDependencies, so they shouldn't be bothering you. Am not that familiar with npm world, feel free to submit a PR.
Existing devDependencies are need to build the project.

I see... they are all coming from the dependencies listed in the "shrinkwrap." I am not familiar with shrinkwrap...  but I'd be happy to take a look.

Feel free to reopen with more information.

I removed the shrinkwrap (deleted npm-shrinkwrap.json), did a production install, and the package seemed to work fine. The shrinkwrap file is forcing a lot of unnecessary dev dependencies to be installed during a production install. I recommend getting rid of it.


fix: 47 add automated tests (partially)

Add some unit tests for the uuid command and tools command.
Did not add for for lint. Need to wait for a new release of go-oscal and rework it after we bump the dependency. Issues with the way it handles errors currently so it breaks tests.
Didn't add for the lula validate command since the oscal version may/will change.
Will add those in a separate PR.
Created a lulatest package to house some common variables and functions that may make testing long term more uniform. Copied a lot of how go-oscal is setup too to keep tools uniform.
Did not update the makefile to include the unit tests as the makefile in main will grab all ready.

Changing back to draft while working through errors.

Tried gomock/testify and could only do a mock situation, basically create how it should work/fail. If the commands change or their functionality then the mock would still pass but the command may not work the same anymore.
Closest to live I could get was to create a geter function for root cmd so it could be used when the cmd package is imported but without making the root command itself public.
Created a fatal wrapper function since the main issue I was running into is the app exits on message.Fatalf this way on the commands that we don't have direct access to their functions (lint, uuidgen, mostly commands straight from go-oscal but maybe some from the shared zarf libraries in the future) we can pass that to the fatal wrapper which checks if it is in test mode, if so use the LogWriter function already in message.go and add in the test Test Mode Error Encountered and the error (easier to look for the error in tests) or if test mode is false it continues as normal and just exits.
Did run into concurrency issues running the tests/subtests in parallel while using the message.LogWriter. Open to suggestions there, main goal was not to add too much complexity for a couple of test cases but could be worth investigating the logging portion more.

Closing issue as https://github.com/defenseunicorns/lula/issues/450 will encompass the testing for this and more.


Move core data types out of Lexer.Type

Stuff like BuiltinName or Version does not belong to the lexer.

Done, finally.


No Scoreboard/Leaderboard

Hey! I've been keeping up with the development of this mod in the background waiting for a full release. I tried to play with a friend recently.
There's no scoreboard above the notes during the song and no scoreboard after the song ends.
There are some other issues, but I wasn't sure if I could use one issue thread for multiple issues.
Thanks for everything you do!

Forgot to mention I used the unstable version and created my own server hub for my friends.

Can you send me your logs? (Beat Saber/Logs/latest.log)

_latest.log
During our play test for multiplayer today, requesting songs broke after a bit.


CLI only installation on OS X?

I only use keybase.io to download people's OpenPGP keys.  I am not interested in

An icon I will ever click at the top of my screen
A graphical application
A kernel module (!)
A "service" that runs with elevated privileges at boot time
An "updater" that phones home in the background
...

It used to be possible to install just the CLI using Homebrew.  Apparently, that now has become a wrapper for the whole "user friendly" installation though.
Is there a way -- short of installing a Go toolchain and building from source -- to get only the CLI on a Mac?  And get it into my $PATH without having to /Applications/foo/bar/mumble/something/keybase install -c cli.  Could this way please be documented somewhere on keybase.io?
Thanks.

We haven't spent time officially supporting this, but go get github.com/keybase/client/go/keybase will get you 90% of the way there if you have go installed, and you don't mind trusting github.

I'd prefer not to install a Go toolchain.  But I've managed to get a more reasonable installation like this.  Perhaps this will be useful for others.
# Link the CLI to /usr/local/bin/keybase
% /Applications/Keybase.app/Contents/SharedSupport/bin/keybase install -c cli
# Terminate the GUI bits
# Note this does **not** kill the privileged helper process!
% keybase ctl stop
# Uninstall everything except for the CLI
# Note this does **not** remove the privileged helper binary
% keybase uninstall -c fuse helper kbfs service updater
% sudo pkill -TERM keybase.Helper
% sudo -f rm /Library/LaunchDaemons/keybase.Helper.plist \
    /Library/PrivilegedHelperTools/keybase.Helper

I've aliased keybase to keybase --standalone too.
So far, this seems to be working.

Thanks for posting that! It should also be compatible with whatever pinentry program you have installed.

It should also be compatible with whatever pinentry program you have installed.

Oh!  Is there any way to tell it which one to use?  It seems to default to pinentry-curses, while I have pinentry-mac in my $PATH.
Thanks.

keybase config set pinentry.path /path/to/your/pinentry/prog

Thanks!  That works!

👍 to a CLI only installation option. After my keybase CLI client got “upgraded” to the new GUI/FUSE/FS/kernel extension thing my first action was to remove Keybase entirely from my computer.
I use Keybase extremely rarely and definitely don't want to have some random kernel extension installed for that…

Totally agree with this: I uninstalled the new Keybase immediately after seeing how invasive it is.
If someone creates a CLI-only Keybase, can we get a Homebrew formula for it (keybase-cli)?

I'm interested in a CLI-only Keybase too. I mainly used the Keybase tool for commandline track operations, and otherwise mostly used the web interface to verify peoples' identities.
keybase track seems to be a command that doesn't support --standalone, so I've just stopped using Keybase altogether. The GUI app is too big and the services are completely unnecessary for anything I do with it.

We've been fixing some standalone bugs recently.  @zapu  have you see that one?

Pretty sure it's caused by the argument parsing here: https://github.com/keybase/client/blob/42ce51214415a68e1348ece2565e28ca21c615be/go/client/cmd_follow.go#L64-L66
It looks like it's doing its own independent argument parsing, and the --standalone isn't consumed and removed from the args by whatever launches track, so it sees it as an extraneous argument and immediately quits with "Error parsing command line arguments: Follow only takes one argument, the user to follow." There's an identical bug in several other commands too.

That argument is stripped off and handled before control gets here.  I think I know why. Try this, I bet it will work:
keybase --standalone track max

(And BTW, we renamed the command to follow):
keybase --standalone follow max

(I just tried it and it worked)

Can't figure out what I did that caused it not to work before! Working for me now, thanks.

Hello, any news on this?

Seems people would flock back in droves if there was a possibility to only install a CLI version of Keybase. Is this still being pursued?

I would still be interested in a CLI-only installation too.  Though I get the impression that Keybase has become more interested in the instant messaging space and the PGP public key directory is increasingly an afterthought.

Actually the chat capabilities on CLI are most useful. Keybase is unique in that is provides a bridge between a mobile chat app and the CLI. That opens up a world of possibilities for building custom chat proxies/bots that propagate messages between non-tech savvy user and a home automation environment. Non-tech savvy users get for free a user-friendly mobile chat app for sending commands to home automation devices and can inversely receive status update messages from them on their mobiles.

Thanks for the info, @ppaeps


[TASK] MPC refactor: gadget_sdk::mpc module and test-utils::mpc module

Now that we've built multiple MPCs, there is duplicated code that can be abstracted away inside the SDK and test utils.
Various MPC-related functions could be added as handles to the GadgetConfiguration that way the GadgetConfiguration stays organized and doesn't turn into a waterfall.
e.g.,
let env: StdGadgetConfiguration = ...;
env.mpc().get_operators_and_self_party_index()

In this case, mpc() would return a handle that references the GadgetConfiguration.
These handles and their functions could be defined inside the gadget_sdk::mpc namespace.
As for testing, we can have the initialization handle much of the repetitive boilerplate. Afterwards, there may be room for a macro to easily define tests, especially MPC-specific macros that often store keys locally using a call ID, and that call ID needs to be funneled into the next job (e.g., keygen -> signing) in order to retrieve data from the local store.

I would rather build this as a custom MPC context @tbraun96, we shouldn't add too many things directly on the env.


Shows wrong translation

I have a very weird problem that I am not able to figure out. Ngx-translate works fine for most of my users, but I have users who report that they are seeing some of the Norwegian text inn my app with very bad translation. This text dosent exist in my app so it seems to some kind of automatic translation from Norwegian to English occurring on the client side that is really bad.
The image below shows an example where the first sentense is some weird combination of Norwegian and English. Has anybod else had similar problems with ngx-translate?

We are also experiencing this issue in a rather large Angular application and so far it's been reported by our norwegian users. We are still trying to pinpoint if there is any patterns to this bug but right now it seems very random.
Some examples:
Overview -> norwegian translation: "Oversikt" -> Bug: "Oversikt (oversikt)"
Live Data -> norwegian translation: Sanntidsdata -> Bug: A random string that we can't find the origin of.


Enhancement: setPower(bool bOn);

Can we have a  setPower(bool bOn) function/method, like in OneBitDisplay?
Most LCD displays have a LED line for switching backlight on / off. This would be a useful API enhancement for this lib.

Yes, this is a good suggestion. I'll add it.