Rethink return types

LINQ has always been given as the example of functional programming in C#. It was introduced when C# was mostly an imperative language. This has radically changed in the latest versions of C# but LINQ has stayed unchanged...
I'm no expert in functional programming but it seems to me that methods like First(), Single(), Last(), Min(), Max() and Average() have some issues. They all throw exceptions when the source is empty. Single() also throws when the source has more than one item. ElementAt() throws an exception when the index parameter is out of bounds.
Throwing exceptions causes side effects...
There are some alternative like FirstOrDefault(), SingleOrDefault(), LastOrDefault(), DefaultIfEmpty() and ElementAtOrDefault() that return the default value of the return type when the source is empty or the index parameter is out of bounds. DefaultIfEmpty() has a second overload that allows the return of a predefined value. This is still an issue for value-types because the default value or even the predefined one may be possible values of the source. SingleOrDefault() still throws when the source has more than one item.
This project is not constrained by breaking changes avoidance. I want it to be a "better" version of LINQ. Keeping a familiar API but taking advantage of newer language features to improve performance and usability.
There are several possible alternatives...
Try pattern
This pattern can be found in many methods. It consist on a method that returns bool and has an output parameter. The parameter outputs a valid value if the method return true.
Here's a possible implementation of First() using this pattern:
public static bool TryFirst<T>(this IEnumerable<T> source, out T value)
{
  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
  {
    value = enumerator.Current;
    return true;
  }

  value = default;
  return false;
}

It can be used this way:
if (source.Where(item => item > 2).TryFirst(out var value))
{
  Console.WriteLine(value);
}

One limitation is that output parameters cannot output value-types by reference. Hyperlinq currently returns read-only references in the cases where the source is an array, Span<T> or equivalent.
Nullable<T>
The method can return a Nullable<T>:
public static T? First<T>(this IEnumerable<T> source) where T : struct
{
  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
    return enumerator.Current;

  return default;
}

The type T has to be constrained to value-types. We would need an overload for reference-types but, because generic constraints are not part of the method signature, the methods must have different names. The alternative is to add a second generic parameter but it would be very confusing.
This alternative has the same issue as FirstOrDefault() and SingleOrDefault(). null may be a possible value for reference-types, so it would be not possible to differentiate between an empty collections and one that contains one or more null values.
ValueTuple<bool, T>
The method can return a tuple:
public static (bool HasValue, T Value) First<T>(this IEnumerable<T> source)
{
  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
    return (true, enumerator.Current);

  return (false, default);
}

But, it's not good idea to use tuples in public APIs.
Option<T>
The method can return Option<T>:
public static Option<T> First<T>(this IEnumerable<T> source)
{
  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
    return Option.Some(enumerator.Current);

  return Option.None;
}

Possible uses:
// returns first; otherwise throws
var first0 = array
  .Where(item => item > 2)
  .First()
  .Match(
    item => item,
    () => throw new InvalidOperationException("Sequence contains no elements"));

// returns first; otherwise returns -1
var first1 = array
  .Where(item => item > 2)
  .First()
  .Match(
    item => item,
    () => -1);

// writes first; otherwise writes <empty>
array
  .Where(item => item > 2)
  .First()
  .Match(
    item => Console.WriteLine(item),
    () => Console.WriteLine("<empty>"));

It's also possible to add a Desconstruct()method to Option<T>:
public void Deconstruct(out bool hasValue, out T value)
{
  hasValue = _hasValue;
  value = _value;
}

It can then be used the following way:
var (hasValue, value) = array.Where(item => item == 4).First();
if (hasValue)
  Console.WriteLine(value);

The C# language does not support fields to be a reference so it would not be possible to return a readonly reference from arrays or Span<T>. This issue may be worked-around by using ByReference<T>.
Result<TOk, TError>
What about Single()? It throws an exception in two different cases. It's the same exception type but with different messages.
It can either return Option<T> but then there is no way to differentiate the errors.
It can return Result<T, string>:
public static Result<T, string> Single<T>(this IEnumerable<T> source)
{
  using var enumerator = source.GetEnumerator();
  if (!enumerator.MoveNext())
    return Result.Error("Sequence contains no elements");
  var value = enumerator.Current;
  if (enumerator.MoveNext())
    return Result.Error("Sequence contains more than one element");

  return Result.Ok(value);
}

But then, just like the exception, we can only differentiate by comparing strings.
It's possible to differentiate the errors with an enum type:
public enum SingleError
{
  Empty,
  Multiple
}

public static Result<T, SingleError> Single<T>(this IEnumerable<T> source)
{
  using var enumerator = source.GetEnumerator();
  if (!enumerator.MoveNext())
    return Result.Error(SingleError.Empty);
  var value = enumerator.Current;
  if (enumerator.MoveNext())
    return Result.Error(SingleError.Multiple);

  return Result.Ok(value);
}

Match pattern
An alternative is to use the match pattern without having to call one more method:
public static TOut First<T, TOut>(this IEnumerable<T> source, Func<T, TOut> some, Func<TOut> none)
{
  if (some is null) throw new ArgumentNullException(nameof(some));
  if (none is null) throw new ArgumentNullException(nameof(none));

  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
    return some(enumerator.Current);

  return none();
}

public static void First<T>(this IEnumerable<T> source, Action<T> some, Action none)
{
  if (some is null) throw new ArgumentNullException(nameof(some));
  if (none is null) throw new ArgumentNullException(nameof(none));

  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
    some(enumerator.Current);
  else
    none();
}

I started this journey to avoid throwing exceptions but lets see if it's possible to have the current behavior of First() and at the same time the match pattern.
public static T First<T>(this IEnumerable<T> source, Func<T> none = null)
{
  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
    return enumerator.Current;

  if (none is null)
    throw new InvalidOperationException("Sequence contains no elements");

  return none();
}

public static TOut First<T, TOut>(this IEnumerable<T> source, Func<T, TOut> some, Func<TOut> none = null)
{
  if (some is null) throw new ArgumentNullException(nameof(some));

  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
    return some(enumerator.Current);

  if (none is null)
    throw new InvalidOperationException("Sequence contains no elements");

  return none();
}

public static void First<T>(this IEnumerable<T> source, Action<T> some, Action none = null)
{
  if (some is null) throw new ArgumentNullException(nameof(some));

  using var enumerator = source.GetEnumerator();
  if (enumerator.MoveNext())
  {
    some(enumerator.Current);
  }
  else
  {
    if (none is null)
      throw new InvalidOperationException("Sequence contains no elements");

    none();
  }
}

Possible uses:
// returns first; otherwise throws
var first0 = array
  .Where(item => item > 2)
  .First();

// returns first; otherwise returns -1
var first1 = array
  .Where(item => item > 2)
  .First(() => -1);

// writes first value; otherwise writes <empty>
array
  .Where(item => item > 2)
  .First(
    item => Console.WriteLine(item),
    () => Console.WriteLine("<empty>"));

I ended up going full circle. This last solution is compatible with LINQ but, at the same time, supports more functional patterns.
But, can it support the return of references in the case of Span<T>?
public static ref readonly T First<T>(this ReadOnlySpan<T> source)
{
  if (source.Length == 0)
    throw new InvalidOperationException("Sequence contains no elements");

  return ref source[0];
}

public static T First<T>(this ReadOnlySpan<T> source, Func<T> none)
{
  if (none is null) throw new ArgumentNullException(nameof(none));

  if (source.Length == 0)
    return none();

  return source[0];
}

public static TOut First<T, TOut>(this ReadOnlySpan<T> source, Func<T, TOut> some, Func<TOut> none = null)
{
  if (some is null) throw new ArgumentNullException(nameof(some));

  if (source.Length == 0)
  {
    if (none is null)
	  throw new InvalidOperationException("Sequence contains no elements");

    return none();
  }

  return some(source[0]);
}

public static void First<T>(this ReadOnlySpan<T> source, Action<T> some, Action none = null)
{
  if (some is null) throw new ArgumentNullException(nameof(some));

  if (source.Length == 0)
  {
    if (none is null)
	  throw new InvalidOperationException("Sequence contains no elements");

    none();
  }
  else
  {
    some(source[0]);
  }
}

It requires one more overload and only this one returns a reference. Lambdas still do not support passing by reference...

Hi. Two notes:

The Value of Option/Result should never be exposed on the object itself. I see you're showing it could be deconstructed into a tuple, but that creates a point of failure where the type system may not be able to protect the user from themselves (i.e. when they accidentally ignore the bool value or handle it incorrectly).

Option is an extremely powerful concept. You can bind and map options as if they were actual values and only deal with matching at the system boundary level. You don't have to match straight away.

In 99% of the cases, I imagine Single() returning Option is just fine. That 1% of cases where it's important for the user to know how many elements are in the sequence, can be handled by some general overload like:

seq.MatchCount(3, exact: items => ..., different: items => ..., empty: () => ...)

But it's hard for me to come up where this would be so important that I'd use it.

@Tyrrrz Thanks for the feedback.
Now I understand that Deconstruct() wouldn't be a good idea. I also agree on the Single().
I'm now wondering how Option<T> should be used with async functions. Have you ever used it in this scenario?

You'd probably add Func<Task> overloads for Match but I wouldn't add them for Bind and Map which are typically pure functions.
You can use LINQ comprehension syntax to enable seamless monadic bind on Task<Option<T>> by implementing a custom SelectMany that only invokes the next function if the former is not None. There are some examples here but it's only for regular Option<T>, not Task<Option<T>> which is essentially the same but works with async stuff.

Actually, now that I think about it, you don't need to add overloads for Func<Task> yourself, just add Func<T> and let the user return whatever they want.
// TOut Option<T>.Match<TOut>(Func<T, TOut> some, Func<TOut> none)

var a = Option.Some(500);

await a.Match(
    some: x => Task.Delay(x),
    none: () => Task.Delay(100)
);

Here's a simple snippet I wrote some time ago that shows how to enable monadic comprehensions for tasks in C#. By itself it's not very useful but it works really well when combined with Result or Option. Anyway, this shows the general idea.
public static class TaskMonadExtensions
{
    public static async Task<TDest> Select<TSource, TDest>(this Task<TSource> task, Func<TSource, TDest> transform)
    {
        var result = await task.ConfigureAwait(false);
        return transform(result);
    }

    public static async Task<TDest> SelectMany<TSource, TJoin, TDest>(this Task<TSource> task, Func<TSource, Task<TJoin>> join,
        Func<TSource, TJoin, TDest> transform)
    {
        var result = await task.ConfigureAwait(false);
        var joined = await join(result).ConfigureAwait(false);
        return transform(result, joined);
    }

    public static async Task Test()
    {
        await
            from a in Task.Run(() => "hello ")
            from b in Task.Run(() => "world")
            select a + b; // hello world
    }
}

@Tyrrrz I already have a branch fully based on Option<>.
You are right in that Match() can handle async without changes but if you need to pass any data, like a CancellationToken, it results in a closure allocation. I added a MatchAsync():
[Pure]
public ValueTask<TOut> MatchAsync<TOut>(Func<T, CancellationToken, ValueTask<TOut>> some, Func<CancellationToken, ValueTask<TOut>> none, CancellationToken cancellationToken = default)
=> hasValue
  ? some(value, cancellationToken)
  : none(cancellationToken);

[Pure]
public ValueTask MatchAsync(Func<T, CancellationToken, ValueTask> some, Func<CancellationToken, ValueTask> none, CancellationToken cancellationToken = default)
=> hasValue
  ? some(value, cancellationToken)
  : none(cancellationToken);

The use of lambda expression by Option<> raises me an issue. One thing I would like to implement is to return by-reference when the source is an array, Span<>, ReadOnlySpan<>, Memory<> and ReadOnlyMemory<>. This allows, less copies and the manipulation of the result item, when not read-only.
C# doesn't allow fields with by-reference types but this limitation can be worked around by using ByReference<>, ReadOnlyByReference<>, NullableByReference<> or NullableReadOnlyByReference<>. The issue is that the lambdas still don't allow passing by-reference. This can also be worked-around by defining delegates but this means, lambdas cannot be used, only methods or local-methods.

To be honest, I'm unfortunately not that familiar with memory optimization techniques, so I can't really suggest a solution.

@Tyrrrz All your suggestions have been great, I just need to think about this some more.

The branch looks nice, I quickly glanced over it and also looked into Option<T> implementation. :+1:
In typical functional scenarios, Where/Select/Bind don't need to be async because you usually use them after getting some data.
var someDataThatDecidesTheWorkflow = await GetDataAsync();

var computedLogic = seq.FirstOrDefault().Where(v => v.Foo == someDataThatDecidesTheWorkflow.Bar);

var someOtherSideEffect = await PushDataAsync(computedLogic);

This is a very basic illustration, but the idea is that you organize your execution into this pure-impure-pure sandwich, where you perform side effects to get data first, perform pure computations on them, then perform side effects to do something with the computed data. In such scenarios, you don't want to have async behavior in Option<T> because that's usually pushed to one of the boundaries. It's not always possible though, sometimes you need to insert side effects in the middle (for example when querying data based on intermediate computation).
Anyway, I don't think that including async variants of Where and possibly other methods is necessarily a bad thing, but you should be careful about how those methods are used. It's just that usually async implies impure side effects because async == IO. And you normally want impurities only when unwrapping the option, which happens in Match. Separating logic into pure and impure like that is what provides testability into functional code, similar to how interfaces and mocks provide testability into classic OOP code.

@Tyrrrz The reason I'm considering async lambdas is because Hyperlinq supports LINQ operations both on sync and async enumerables. This means it implements sync and async versions of each operation, for example, Where(), Select(), FirstAsync(), SingleAsync() and many more. Just like in the "official" System.Linq.Async, these operations support async predicates and selectors.
I thought exactly the same as you. These operations on Option<> are performed after the value is retrieved but then, what if the predicate for Where() needs to call an async method? It would force the developer to call .GetAwaiter().GetResult(). My gut feeling is that this is becoming increasingly common as many APIs are becoming async. But, am I right? I'm not sure...
I'm juggling here between making it complete but also manageable. 😓

Yeah I get that. But the reason these async counterparts make sense is because the actual enumerator is asynchronous too. In case with Option<T> (which is essentially a so-called unit-container, an enumerable of zero or one element), there is no async version. So does it make sense in this case?
As a general rule of thumb, async almost always implies impure IO (unless it's Task.FromResult) so by adding it into an otherwise pure function, it becomes impure as well.
Maybe you have an example where it makes sense to use WhereAsync on Option<T>?


Neomutt section of neomutt.org/dev/releases page contains broken links

Every commit-link in the Neomutt section of neomutt.org/dev/releases is broken.
Sth is wrong with @flatcap 's script, as you link to the commit hash d8fd0708  but the correct hash is 4560be576c3b19b6c305d31d1328662b09725fbb.

****!  Thanks for spotting that.
I trust my ability to script so much that I didn't check my results :-(


interrupt execution

Note: I just rebased the PR against current develop to fix a conflict (fixed anchor).

LGTM, thanks @ISSOtm and @AlvaroBurnett !


[Designer-Help]: 'Help' dialog is not adopting the Aquatic/Desert theme of high contrast.

https://microsoft.visualstudio.com/OS/_workitems/edit/37809169

This issue is not repro, hence closing this issue.


[MINOR] Improvement(dashboard): Support display human-readable time format for app page

What changes were proposed in this pull request?
Display the human-readable time format in application page.
Why are the changes needed?
A long type timestamp really hard to get information from it.
Does this PR introduce any user-facing change?
Format the update time to human-readable.
How was this patch tested?

Good catch! Please remove useless auto-generated information in the description of this PR.

@xianjingfeng Thanks for you suggestion commit, I've accepted all of them, PTAL.

@xianjingfeng Please approve it.

@maobaolong Please delete the auto-generated info like (Please outline the changes and how this PR fixes the issue.) in the description. Thanks.

@rickyma Done.


Configure feature test macros in meson (via config.h)

This is an alternative to #2812.
cc @RipleyTom

Merged into dev.


HTML

HTML
User Story
As a new Bootcamp student
I want the prework study notes to be outlined on a single page
so I can easily access and review notes
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I visit the website in my browser
THEN I see four boxes titled HTML, CSS, Git, and JavaScript with associated notes listed

CSS
User Story
As a new Bootcamp Student
I want the prework notes to be structured on a webpage
So that I can easily find and read the information
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I view the study guide
THEN I see a dark blue header and footer, and four boxes with a shadow

Javascript
User Story
As a new Bootcamp Student
I want the prework notes to be structured on a webpage
so that I can easily find and read the information
##Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I view the Study Guide
THEN I can see the four topics I learned listed along with a suggestion on what I should study first


Celery doesn't work with Redis Sentinel

Bug description
DD deployed in k8s from helm chart. Redis from redis-operator in sentinel mode. Error ValueError: 'master_name' transport option must be specified.
Expected behavior
Works correct
Deployment method (select with an X)

[ ] Docker Compose
[X] Kubernetes
[ ] GoDojo

Environment information

Operating System: k8s 1.27.4
appVersion: "2.28.3"
Chart version: 1.6.97

Logs
defectdojo-celery-worker: ValueError: 'master_name' transport option must be specified.
Additional context (optional)
Resolved by adding evironment variable DD_CELERY_BROKER_TRANSPORT_OPTIONS: '{"master_name": "mymaster"}'

Resolving:

Just add it to /helm/defectdojo/templates/configmap.yaml:
DD_CELERY_BROKER_TRANSPORT_OPTIONS: '{{ if eq .Values.celery.broker "redis" }}{{ if eq .Values.redis.scheme "sentinel" }}{{ .Values.redis.transportOptions }}{{ end }}{{ end }}'
And to /helm/defectdojo/values.yaml:
transportOptions: '{ "master_name": "mymaster"}'

You could just use extraEnv in current chart version, but I guess my offer can help other users to be more happy if you improve chart


Update config.json to match new specification

For the past three years, the ordering of exercises has been done based on gut feelings and wild guesses. As a result, the progression of the exercises has been somewhat haphazard.
In the past few months maintainers of several tracks have invested a great deal of time in analyzing what concepts various exercises require, and then reordering the tracks as a result of that analysis.
It would be useful to bake this data into the track configuration so that we can adjust it over time as we learn more about each exercise.
To this end, we've decided to add a new key exercises in the config.json file, and deprecate the problems key.
See exercism/discussions#60 for details about this decision.
Note that we will not be removing the problems key at this time, as this would break the website and a number of tools.
The process for deprecating the old problems array will be:

Update all of the track configs to contain the new exercises key, with whatever data we have.
Simultaneously change the website and tools to support both formats.
Once all of the tracks have added the exercises key, remove support for the old key in the site and tools.
Remove the old key from all of the track configs.

In the new format, each exercise is a JSON object with three properties:

slug: the identifier of the exercise
difficulty: a number from 1 to 10 where 1 is the easiest and 10 is the most difficult
topics: an array of strings describing topics relevant to the exercise. We maintain
a list of common topics at https://github.com/exercism/x-common/blob/master/TOPICS.txt. Do not feel like you need to restrict yourself to this list;
it's only there so that we don't end up with 20 variations on the same topic. Each
language is different, and there will likely be topics specific to each language that will
not make it onto the list.

The difficulty rating can be a very rough estimate.
The topics array can be empty if this analysis has not yet been done.
Example:
"exercises": [
  {
    "slug": "hello-world" ,
    "difficulty": 1,
    "topics": [
        "control-flow (if-statements)",
        "optional values",
        "text formatting"
    ]
  },
  {
    "difficulty": 3,
    "slug": "anagram",
    "topics": [
        "strings",
        "filtering"
    ]
  },
  {
    "difficulty": 10,
    "slug": "forth",
    "topics": [
        "parsing",
        "transforming",
        "stacks"
    ]
  }
]

It may be worth making the change in several passes:

Add the exercises key with the array of objects, where difficulty is 1 and topics is empty.
Update the difficulty settings to reflect a more accurate guess.
Add topics (perhaps one-by-one, in separate pull requests, in order to have useful discussions about each exercise).

I'm working my way through this.

Observation made in #195

The problem I ran in to is that I find the difficulty rating impossible. What does 'difficult' mean? Is it hard because it introduces Lifetimes? Because it's algorithmically hard? And guessing at the difficulty of exercises I haven't done was even harder.

One possible benefit of adding difficulty and topics to config.json was to make sure our exercises are ordered in a sane way. But we have been paying attention to ordering ever since #127, so we miss that benefit.
I managed to add topics in #229 because we already had the topics ready to go.
So now one of our few incentives for adding difficulties is "we get to close one more issue", or something. That wasn't enough incentive for me to go through and rate all our exercises. If the rating showed on the website, then that'd be another story.

I think it would be fine to leave all the difficulties at 1 until we feel like we have a use for them. I'd just close the issue.

I have a compromise solution to propose to the track maintainers in #252.


cargo-mobile2: rename from tauri-mobile and update to 0.7.0

Description of changes
the package was renamed and this was updated to latest
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[x] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

@bburdette you've expressed interest in this package before. Just in case you are interested in testing / having a look.

thx hopefully I'll have time to get back to this soon


dificulties with 1.17.1

so doesn't matter what. i cant build the 1.17.1 version. i've tried everything. can someone send me the 1.17.1 build

extract the zip file, when you have downloaded the master zip thingy
where the file location is written type cmd
type gradlew build and press enter
wait for it to finish
check the build file it's somewhere there
or just download it from me
seedcracker-0.2.3-beta.zip

extract the zip file, when you have downloaded the master zip thingy
where the file location is written type cmd
type gradlew build and press enter
wait for it to finish
check the build file it's somewhere there
or just download it from me
seedcracker-0.2.3-beta.zip

yea. the problem is. my cmd says gradlew isnt a command. but i have installed gradle

extract the zip file, when you have downloaded the master zip thingy
where the file location is written type cmd
type gradlew build and press enter
wait for it to finish
check the build file it's somewhere there
or just download it from me
seedcracker-0.2.3-beta.zip

thx :)

When I try to run /seed version 1.17.1 it says ur bad, git gud syntax so it seems like it doesn't support 1.17


CORE-17955 - The logic that creates a state has been merged with the logic that updates a state in the ClaimStateStore implementation class.

The intention was only to move code around to make it tidier. The logic should remain the same.

This PR should only be merged after the e2e tests are green.

E2E tests are green.
Build: https://ci02.dev.r3.com/blue/organizations/jenkins/Corda5%2Fcorda5-e2e-tests/detail/release%2F5.2/41/pipeline/


Kata page crushes

Describe the bug
https://www.codewars.com/kata
https://www.codewars.com/kata/latest/
https://www.codewars.com/kata/latest/my-languages
crushes when i want reach them
To Reproduce
Steps to reproduce the behavior:

Just go to that links
1 sec seems page loads
Crush

Expected Behavior
Loaded page with list of my katas
Screenshots
If applicable, add screenshots to help explain your problem.
Contexts
Please complete the following information:

Codewars username (if account related): sandbox992
OS: Win7 x64
Browser: Chrome, Mozilla (both crushed pages)
Browser Version: [Chrome 70.0.3538.102, Mozilla 63.0.3]

P.S.
Mozilla sreenshot - just what i can catch before crush - I mean reload page - take screenshot - page crushed; No errors in console; All extensions turned off; Incognito page already tried

Closing as duplicate of #1157. Please look there for more information. Some users have found that it's related to icons and posted workarounds.


new feature added

@mohittk Please check out this feature, It looks better for the mobile view as well as the desktop view. This user redirection looks better now I guess. Before in the desktop view, it was not clear to the user where the content is loading.
Do let me know your views on this #61
https://user-images.githubusercontent.com/65736744/137189461-5c82396d-37be-4679-b39f-000279325272.mp4
https://user-images.githubusercontent.com/65736744/137189498-4b930c19-f56f-41f9-bc30-8cc72456490d.mp4
.

@RashiSingh20 thanks for contribution!

@mohittk Thank you!


Use dask to load many images lazily from CLI

Description
What the title says. =P
Recently I was helping a student who needed to annotate thousands of images. Annotation is quick with the right tool, and I thought napari could do the trick. I think it will, but we needed a way to load the images lazily.
This still won't solve the problem directly because we don't have a save button for the points layer (or any layer!), but at least it provides some sample code for how one could do it.
Type of change

[ ] Bug-fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

References

How has this been tested?

[ ] example: the test suite for my feature covers cases x, y, and z
[ ] example: all tests pass with my change

Final checklist:

[ ] My PR is the minimum possible work for the desired functionality
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works

A couple things:

adding dask to the CLI means adding it to our full dependencies - how do we want to think about optional dependencies for file-io? do you want to make a separate list of these dependencies, like zarr / dask / xarray? right now we have them in our "test" dependencies. @kne42 might have ideas

as you said for now there is no saving of labels, adding some in will be fine, but right now the labels layer doesn't work with a dask array as you can't "paint" into them - i.e. you can't edit the data in place. not sure how to solve that one yet, but might be easier if we actually have file saving enabled and we can just write our changes right back to the file

agreed that we shouldn't have dask as a requirement. this code should be structured such that it will only work/appear as an option if dask is installed. then, we add an optional dependency package as napari[cli], napari[io], etc. to direct people to install if they want all I/O features

Is there a reason the skimage.io.ImageCollection (which is already being used) can't be switched to using the conserve_memory flag to lazily load the images instead? Are there performance improvements when using dask?

No performance improvements, but yes API improvements, because Napari expects an array like object, with things like ndim and shape, which ImageCollection lacks.

But skimage.io.ImageCollection is already being used in napari - is the intention to remove that then?
What aspects of the array like object are needed other ndim and shape?
There  might be an argument for adding a lightweight adaptor on top of the ImageCollection to give it some of these (easy to implement) array-like attributes?

@jmetz we'll be working on our file IO quite a bit over the next 6 weeks. we're got a couple issues #379 and #490 where we've been discussing these things. In general I'd definitely like to standardize our file IO across the different ways of loading images (CLI, drag / drop, menubar) and use optional dependencies to allow people to take advantage of more advanced file IO options without forcing everyone to depend on them.
I think we'll probably use imageio for the simple stuff (which already is a dependency), and then we might push the lazy stuff onto dask / dask image, but we'll need to see.
For us it's really nice to have an array like object that you can index into as you index into a numpy array, and which when you call np.asarray on actually gives you a numpy array. I think adding that sort of indexing onto the ImageCollection would be a lot.

@sofroniewn  ah got it - thanks for the clarification. Looking forward to seeing how things evolve!

@jmetz sounds good, if you have any more requests around io feel free to add them to those issues or make a new issue!

@jni can this be closed as superceeded by #560?

@sofroniewn well, yes and no, since as you pointed out there, there is an error in my implementation there!

:-) we can make some follow up PRs to #560

This has now been superceeded by #590 right @jni? I'm closing


Add npm for Hugo pipes post css cli support

Hi,
Looking to take advantage of Hugo pipes now we’re a few stable releases in. Part of my pipeline will be adding vendor prefixes to the output css, which requires post css cli for Hugo to process (we’ll need to install post css cli via npm)
I was wondering if it would be good to add npm to the image for those who use this image and want to take full advantage of Hugo pipes, including post css support?
Link below to documentation on post css support in Hugo pipes for reference:
https://gohugo.io/hugo-pipes/postcss/
Many thanks

Hey @BinaryJim,
I'll be honest, I'm hesitant to do this because I like to keep this image as slim as possible and I'm not a fan of npm. That being said, I decided to do a vote with the Hugo community is to see if most people agree with you and would like npm, maybe yarnm or if this repo should remain the same.
Here's the post/poll: https://discourse.gohugo.io/t/which-javascript-package-manager-do-you-use-with-hugo/13695

Hey, @felicianotech
Thanks for getting back to me and opening a discussion on Hugo community forum.
To simplify communication I’ve replied to your post on the forum.

I'm going to close this issue as the poll results suggest leaving the image as-is.
I'm willing to take a look at this again in 2019 and see if there's a change in opinion.


Bug Report: Glitch window closing/opening transition

Which operating system are you trying to install?
macOS "Big Sur" in KDE Neon
Describe the bug
Hi! Thanks for your open source proyect! I need help with my installation of macOS "Big Sur" in KDE Neon. The installation was successfully with "setup.sh", and I could install Homebrew and audio driver. But when I close a window in the VM,  it is "glitch" and takes time to close. Even changing from "Aladino" to Windows-like effect.
To Reproduce
Steps to reproduce the behavior:

Open "basic.sh"
Start from my installation HD.
Close a Window with yellow button.
Takes time to close.

Expected behavior
The window should have been closed smoothly.
Desktop (please complete the following information):

OS: [KDE NEON (Ubuntu-based)]
Version [20 LTS] (the lastest update from "Discover")

@victinifan360 this is a known issue as the vm does not come with a graphics card by default. You can turn off animations or pass through a gpu using the guides provided.

@notAperson535 And how do I do that "pass through"? May you pass me a link, please?
Thanks!

@victinifan360 here you go: https://oneclick-macos-simple-kvm.notaperson535.is-a.dev/docs/guide-passthrough

@notAperson535 I could't use pass throught, so I decided to animations. But, when I tick the accesibility "Reduce motion" button", nothing happens. I still have animations.

@victinifan360 the solution is to sadly, do nothing and don't use the minimize button at all lol

XD
Do you know a sollution for this?
I also updated my answer.
Thanks!


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/113764

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/114336

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/114337

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/119170


Add ms.setDefaults method

The idea is that it would be nice to be able to set up specific defaults for symbols, so instead of always having hard coded default values, it would be nice to be able to do ms.setDefaults(options) and set values that will be used for all generated symbols.
The options should be separated in two objects, one for options and one for style, they could be named
ms._defaults.options and ms._defaults.style

Since it is now possible to always include a default set of options when a symbol is created or updated, this is not needed.


Add 'instance of' filter to GetTopicIdentifiers command class.

Currently, the GetTopicIdentifiers command class returns topic identifiers regardless of the type (i.e., instance of) of the topics. It should be possible to filter what type of topic identifiers should be returned. This is already relevant for StoryTechnologies' scene browser.

Implemented and tested (in "production" with Story Engine: https://github.com/brettkromkamp/story_engine).


Error when trying example

I tried to run the codes in https://github.com/SESman/rbl, but when I run
library(rbl)
data(exses) # Load the package example dataset
ind(ses)    # Set it as default individual to avoid writing its name everytime
Extract bottom of the dive number 65 of exses
dv_btt <- tdrply(identity, ty = "_", no = 65)
I get
Error in eval(cache$link$val, cache$link$env) : object 'ses' not found
I changed "ses" for "exses", which fixed the error. But then, when I execute
tdrply(max, "depth", ty = "!_/", no = 400, na.rm = TRUE)
I get
!_/#400
NA
Warning message:
In FUN(X[[i]], ...) :
Some periods have no matching entry in "delim" table of "obj". Found for "no" in  400
I restarted R, and made sure I have the updated version of the package.
Could you please tell me where the error could be coming from?

Hello,
Thank you for your feedback, here is my answer:
library(rbl)

data(exses)
ind(exses)  # Instead of "ses" indeed...

tdrply(max, "depth", ty = "!_/", no = 400, na.rm = TRUE)
# !_/#400
#   NA
# Warning message:
#   In FUN(X[[i]], ...) :
#   Some periods have no matching entry in "delim" table of "obj". Found for "no" in  400

# This warning says that tdrply could not find dive/bottom delimitation information
# for dive no  400.
# /!\ That would be because I downsized the example dataset "exses" (which is still > 40 MB !)

# Now the last dive in this dataset is actually :
max(exses$delim$no_dive)
# 311

# NB: max(exses$no_dive) may be a easier way to get access to this info
# but is not recommended: its true purpose is to store the dive numbers to use
# by default (some dives may be systematically ignore if, for example,
# their data are corrupted) when the "no" argument of "tdrply" is not specified...

tdrply(max, "depth", ty = "!_/", no = 311, na.rm = TRUE)
# !_/#311
#   601.5

# Which seems to work as expected. Now I need to fix the README file asap.

I wish you good luck with the rest package. I haven't used it myself for some time now.

Great, thanks for the quick reply!

You're welcome !


Cache functions as single argument

Since the very first version, mem has a "cache if it's not a function AND not an object", which I don't understand because functions are can't be serialized via JSON.stringify
In short (unless I'm drunk 🤔) I think mem should always use the ONE argument as key, unless it's a serializable object.

I think the reason I didn't support functions is that the user can set their own cache, and it might be something that needs to serialize the value.

and it might be something that needs to serialize the value.

In that case they can also set cacheKey, since it goes hand in hand with cache's key-ing mechanism.

In that case they can also set cacheKey, since it goes hand in hand with cache's key-ing mechanism.

I agree. Can you add a note about that in the readme? Just so we're clear about how it works. It might not be obvious to everyone that we cache the function reference too.

It might not be obvious to everyone that we cache the function reference too.

Why would it be otherwise? I think at most we could mention that objects and multiple arguments are cached by value.

Will you release this as a patch or are you waiting for #36 to release a major?


PHOENIX-7191 Connectionless CQSs don't work with non-ZK registries

The tests are green, but the postback from github is very unreliable:
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1809/2/PR_20General_20Check_20Report/

merged manually


Add detail on how long does Trial Salesforce org will be valid

It is important for users to know when/if they choose to use Trial Salesforce org instead of linking to their real production org, and how long this trial will be active. In cases, when users try to do quick POC or test new AI functionality it is not documented here.
It is likely limited to 30-day trial but to know this, the user must seek information somewhere in Salesforce docs.

I assigned this to myself. I'm pretty sure this is feedback for the Einstein enablement topic I wrote.


I need to store user type after user login.

I have 4 types of users, and for each type i have a type in the user table.
How to store user type (or similar information) after the user is successfully logged in?

@selfinpireself you could add role information when creating the JWT...
function createJWT(user) {
	var payload = {
		admin: user.admin,
		clean: user.clean,
		sub: user._id,
		iat: moment().unix(),
		exp: moment().add(14, 'days').unix()
	};
	return jwt.encode(payload, config.TOKEN_SECRET);
}

Then you will have your reference... if you need to change the role, update it with a new token.


[CASSANDRA-14556] Optimize Streaming

I'm running into some dtest failures, I am in the process of fixing them.

Fixed the data directory selection
Added & updated unit tests
Added documentation in cassandra.yaml
Updated the microbenchmark to benchmark the read and write path for faster streaming as well as existing streaming

The dtest doesn't validate that the kind of streaming you wanted to occur occured just that streaming succeeded.
I would also like to see it validate that if you run leveled compaction it will tend stream whole tables from the deeper levels which is one of the success criteria.
It would also be good to see that it works with CASSANDRA-6696 and size tiered and ends up streaming whole sstables.

The dtest does validate the kind of streaming occurred see - https://github.com/apache/cassandra-dtest/compare/master...dineshjoshi:faster-streaming-rev2#diff-556858bf3074903213f73e382cf70297R58

Ah it's the log statement block stream? Great. I think the thing I would look for then is just some log details about what percentage was block streamed vs regular streamed and assert that the expected amount of block streaming occurred.

@aweisberg I have updated the dtest to test with different compaction strategies and addressed remaining comments.

Where is the dtest? The existing link doesn't seem to work and when I looked at your repo there are no branches with these tests?

@iamaleksey I have resolved most of your comments. I still have a couple to go. I will update this PR when I am done with those and get a clean dtest run.

@iamaleksey I think I've resolved all your comments. The last dtest was all green. I'm not sure about the latest push but I don't forsee any breakages. Please let me know if there are more changes required.

@iamaleksey I've addressed your comments including the one about disabling faster streaming for legacy counter shards.
I did add a much less expensive check for STCS. It won't get all SSTables accurately but it is way cheaper than what I have for LCS. Let me know your thoughts.

@iamaleksey made a few more changes -

Got rid of IStreamWriter
Ensured we're logging the configuration warning only once at start up iff zero copy streaming is enabled
Few stylistic changes

@dineshjoshi nice round of changes! I think we are there, or almost-almost there, at worst. Let me do one last pass before we go ahead and commit.


Fix subscriber height being too tall for viewport

Closes TryGhost/Ghost#7163

With flex-column, setting height to 100% will make the child the same
as the full height of the flex container, not fill up the remaining
space, so it was bleeding down below the viewport

Thanks @dbalders!


[Feature] Add post claim invite modal

Change the post claim modal to show a task:

100/50 amounts should be pulled from celo invite rewards contract.
Figma:
https://www.figma.com/file/ihw1PxBvLxacTHnN2aj4lC/3.-Product-💵?type=design&node-id=7168%3A32906&mode=design&t=E6be2fw5FTC2mr55-1

@L03TJ3

we need a way to identify that user actions are coming from that modal for analytics @patpedrosa  FYI
you can't use 'px' values it is not compatible  with react native.

In the event "INVITE_SHARE" we can send in the property "method" the info  "task"
{
 "method": "task"
}

Currently this property holds "copy" and "native"

@sirpy I don't know what you mean with 'px' values
I have looked over the merged-pr and I cannot see I have defined them anywhere (except for the shadow, which is only used on web)

invite_share event for task added here: https://github.com/GoodDollar/GoodDAPP/commit/5a8c7754214f88e71dc535ef3799f739e13c370d

@L03TJ3 yeah i ment the shadows. if it is web only then fine.

@drptiago would just adding the property type suffice?
so then could have:
method: copy OR native (web or mobile)
type: share OR task

Yes, it's enough @L03TJ3
Also, why not use web OR mobile instead copy OR native?

@drptiago wont that change interfere then with legacy data?

verified on prod


U/wmwv/calexp postage stamp from coadd

Demonstrate how to load postage stamps and forced-photometry from the individual visit-level data for objects identified from the Object table based on the coadded images.
@ehneilsen @rmjarvis I wrote this following your questions at the DESC meeting.

Is this what you were looking for?
What could be clearer?
Is there anything additional?

@EiffL I believe this is relevant for your metacal work as well if you want to go through individual images.  I'd be interested in your feedback as well along with any simplifications or alternate approaches you might recommend.
There are two outstanding issues, but I'd like to get your feedback about the overall direction and utility of the notebook before polishing those up.
Outstanding Issues:

[ ] One unfortunate bit is that for Run 1.1 there were just a few images for each coadd so I haven't found an object that results in multiple visits for the forced photometry.  If you find such an object, please let me know and I'll use that one instead.  It's also possible that I'm doing something subtly wrong and thus not finding the objects.
[ ] I should experiment with using the calexp WCS to look up whether or not a location falls within the image rather than matching the object ID in the forced source catalog.  This naively should make get_all_images_for_object_id_from_data_ids faster.

@yymao Here's some code to do RA, Dec -> tract, patch -> overlapping visits.
As noted in the PR text, I should work to make it faster, but here's the idea in case you're interested in taking a look for your postage-stamp server work.

@wmwv Thanks for the pointers! Turns out it's not as straightforward as I thought to write a clean cutout service API that works seamlessly for both coadd images and per-visit images. Here's what I have right now that only works for coadd images. I'll need to give it some more thoughts. In the meantime, your input is certainly very welcome, or we can discuss more in person when you are back to Pittsburgh.

hi @wmwv, just wanted to check the status of this PR, were the data access issues solved?

hi @EiffL, @rmjarvis, @ehneilsen - are there additional things you need from @wmwv in this PR?

Not me.  (I mostly use full calexps, not postage stamps, so tbh, I didn't look to closely at the details of this.)


Handle explicitly bucketed numeric and categorical attributes

Eppo Internal:
🎟 Ticket: FF-2511 - JS SDK - Support explicitly passed numeric/categorical attributes
Motivation and Context
Sometimes, it may not be obvious if an attribute is numeric or categorical (e.g., area code, zip code, group number, etc.), so we provide the ability for clients to be specific about which attributes are numeric or categorical.
Description
New Types
In addition to the existing types:
export type AttributeType = string | number | boolean;
export type Attributes = { [key: string]: AttributeType };

We define some new types:
export type ContextAttributes = {
  numericAttributes: Attributes;
  categoricalAttributes: Attributes;
};
export type BanditSubjectAttributes = Attributes | ContextAttributes;
export type BanditActions =
  | string[]
  | Record<string, Attributes>
  | Record<string, ContextAttributes>;

The last two are what is passed to getBanditAction() for subjectAttributes and actions respectively, allowing flexibility for implementing engineers to do what is easiest and makes sense for their use case.
BanditEvaluator's evaluateBandit() method has been modified to take the contextual versions of subject attributes (ContextAttributes) and actions (Record<string, ContextAttributes>).
Helper Methods
The client's getBanditAction() has been modified with two helper functions to ensure that, regardless of what users provide, the evaluator gets the contextual versions:

ensureContextualSubjectAttributes()
ensureActionsWithContextualAttributes()

getBanditAction() also uses another helper method for its call to getStringAssignment() which, like other assignment getters, does not need context with the attributes:

ensureNonContextualSubjectAttributes()

Combined, the above three helper methods safely allow full flexibility.
How has this been tested?

The existing shared test cases in eppo-client.spec.ts and eppo-client-with-bandits.spec.ts, which test the explicit bucketing cases
Additional JavaScript-client-specific tests in eppo-client-with-bandits.spec.ts for when attributes are not explicitly bucketed

Looks great!
Are there doc/README updates planned for this change? We're going to great lengths to allow flexibility for devs, but all for nought if they're not communicated.

Are there doc/README updates planned for this change?

Yes! We will update the docs and fold into README as well; but this will be done as a separate documentation PR


the React element as a immutable List does not work well.

In my app, the prop 'products' is a Immutable List as below
  render() {
    return (
      <div>
        {this.props.products.map((product, index) => (
          <ProductView key={index} item={product} />))}
      </div>
    );
  }

after mapping of List instance, the return value is still a Immutable List.
In lower-cost version of webview, it does not work.
So I can only change the List instance to pure javascript by toJS function.
Who can explain the reason exactly? thanks in advance.

Closing this aging issue.
Sorry, I'm not sure I follow. Immutable is designed to provide iterable collections which React can collect as children via the technique described in iterall. Ensure your version of React is up to date.


Remove version: Freeplane.Freeplane version 1.11.2

[Automated] It returns code over 400 in all urls
Microsoft Reviewers: Open in CodeFlow

URL: https://sourceforge.net/projects/freeplane/files/freeplane stable/archive/1.11.2/Freeplane-Setup-1.11.2.exe/download
OK
(Automated message - build 923)

Close with reason: Removal appears to be automated and in error;


Adds support for ipfs-cluster to shop deployer

Adds support for ipfs-cluster to shop deployer.  It currently uses the same host as the network-level configured IPFS API, you just need to add the user and password.

@nick So dealing with merge conflicts I noticed the new pinner argument to deployShop().  I see it's tied to a select box.  I wonder if it's useful to select the pinner service here, rather than a boolean "should be pinned" kind of setting?
If pinata and an IPFS cluster is configured, why not pin to both when doing deployment?

Sure we can merge this and I'll convert the select to checkboxes instead

Okay.  Added ipfs-cluster option to the dropdown anyway to match the current implementation.


PXP-467: [CLI] Generating a default changelog for the rollback operation

Summary

Ticket: PXP-467
What's Changed

Added

[x] add a default changelog for rollback

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: jk-gan
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: jk-gan, onimsha
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


facebook about page

hello ,
when i tried to use this code , i get the about section of the facebook page. can you please help me i want to go to the home

section of the page
startApp.set({ /* params */
    "action": "ACTION_VIEW",
    "uri": "fb://facewebmodal/f?href=https://www.facebook.com/TunPark/"
}).start();

@bigbossmaher
Hi i think that you can use the uri to fin the aplication inside the device.. for facebook is "com.facebook.katana"
inside the code its looks like..
startapp.set({
"application": "com.facebook.katana"
}).start();
and if you are using .JS
you can use Intent it can help you.
https://es.stackoverflow.com/questions/68903/intent-para-abrir-perfil-de-con-la-app-de-facebook-mediante-page-id-android


bug: closing trouble after using a trouble command in netrw breaks trouble

Did you check docs and existing issues?

[X] I have read all the trouble.nvim docs
[X] I have searched the existing issues of trouble.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
0.9.5
Operating system/version
MacOS 14.2.1
Describe the bug
See title.
I get the following error:
E5108: Error executing lua ....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:355: BufLeave Autocommands for "<buffer=9>": Vim(lua):E5108: Error executing lua ....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:249: Cursor position outside buffer
stack traceback:
	[C]: in function 'nvim_win_set_cursor'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:249: in function 'close_preview'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:233: in function 'on_leave'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/init.lua:218: in function 'action'
	[string ":lua"]:1: in main chunk
	[C]: in function 'nvim_set_current_win'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:355: in function 'close'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/init.lua:28: in function 'close'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/init.lua:96: in function 'toggle'
	[string ":lua"]:1: in main chunk
stack traceback:
	[C]: in function 'nvim_set_current_win'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/view.lua:355: in function 'close'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/init.lua:28: in function 'close'
	....local/share/nvim/lazy/trouble.nvim/lua/trouble/init.lua:96: in function 'toggle'
	[string ":lua"]:1: in main chunk

Steps To Reproduce

Go to netrw file explorer in neovim
Use a Trouble command, such as :TroubleToggle workspace_diagnostics (or :TodoTrouble in the minimal repro to do the next step without lsp errors)
Navigate to a line with an issue so that the file with the issue is displayed in the active buffer, i.e. where netrw was previously shown
Attempt to close Trouble with :TroubleToggle

Expected Behavior
The Trouble window should close and return the active buffer to netrw.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/trouble.nvim",
  -- add any other plugins here
  {
    "folke/todo-comments.nvim",
    dependencies = { "nvim-lua/plenary.nvim" },
    opts = {}
  }
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Development on the main branch is EOL.
Trouble has been rewritten and will be merged in main soon.
This issue/feature either no longer exists or has been implemented on dev.
For more info, see https://github.com/folke/trouble.nvim/tree/dev


add analyses legacy ruleset

I think that assay type should be mandatory, as it is for experimental legacy rules as well.
Also, have you confirmed for the ENA rules that none of the other fields other than study are considered mandatory by ENA?

I think that assay type should be mandatory, as it is for experimental legacy rules as well.
Also, have you confirmed for the ENA rules that none of the other fields other than study are considered mandatory by ENA?

Assay type is experiment related and experiment is optional in ENA analysis xsd, therefore expect to be optional for non-FAANG analysis
Change mandatory ENA analysis fields to mandatory in FAANG legacy
The only exception is study_ref. Sam has confirmed that the mandatory fields include alias, study, analysis type and files.


[WIP] Backport multiwallet functionality

To Backport:

https://github.com/bitcoin/bitcoin/pull/8775 (Done)
https://github.com/bitcoin/bitcoin/pull/8776 (Done)
https://github.com/bitcoin/bitcoin/pull/8774 (Done)
https://github.com/bitcoin/bitcoin/pull/8694
and more https://github.com/bitcoin/bitcoin/projects/2#card-205279

Above commits backport https://github.com/bitcoin/bitcoin/pull/8775

Above commits backport bitcoin#8775

backports https://github.com/bitcoin/bitcoin/pull/8774

Hello @luke-jr ,
Is there any way where we can increase the number of wallets to be in loaded state at same time.As rightnow its like if I load wallet more than 100 or 150 daemon is getting crashed/stopped. I am trying to load/unload wallet dynamically using RPC.
What i tried is incraesing the set_lk_max_lockers to 400000 and also added
set_lg_regionmax 1048576 But still same things I am facing.
Reflink for above setup : https://docs.oracle.com/cd/E17276_01/html/api_reference/C/set_lk_max_lockers_parameter.html
https://bitcoin.stackexchange.com/a/70737
So is there any way or configuration or any changes which can increase and allow more number of wallets to be loaded ?

Hey @adneerav , it appears that your comment may have been intended for the Bitcoin repo (since luke-jr is more of a contributor there rather than for Dash). If you have a feature request for Dash, please create a new issue rather than posting to this one which is for something else.
Thanks!


chore: Add missing commas in documentation

Description
In two of our examples in the inline code comments, the code examples were missing a comma.
Related links, issue #, if available: n/a
How has this been tested?
n/a

Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness

Changes include appropriate documentation updates.
Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
Changes do not include unsupported browser features, see CONTRIBUTING.md.
Changes were manually tested for accessibility, see accessibility guidelines.

Security

If the code handles URLs: all URLs are validated through the checkSafeUrl function.

Testing

Changes are covered with new/existing unit tests?
Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

You need to update snapshot tests to pass this change


⚠ Processors has degraded performance

In fe944e4, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 83 ms

Resolved: Processors performance has improved in e7f5b66.


Add Poetry Configuration

Description
Added a pyproject.toml file to configure Poetry for the project. This file specifies the project name as "python-practice", sets the Python version requirement to ^3.12, and configures Poetry as the build system. The file also includes basic project metadata such as the author and license information.
fixes #3

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#26
#25
#24
#23  👈
#22
#19
#18
#17
#16
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @JackPlowman and the rest of your teammates on  Graphite

Merge activity

Sep 19, 11:29 AM EDT: @JackPlowman merged this pull request with Graphite.


Student: Request a Change: "Unexpected error" displayed instead of intuitive error message when invalid data entered in Application # field

Describe the Bug
"Unexpected error" displayed instead of intuitive error message when Application # inputted where that App # does not correspond to an application in the student's history
Expected Behaviour
A clear message to enter a valid application number:

"Please enter an application number corresponding to one of your active applications."

Ref #3033 for future dropdown list
Actual Behaviour
Error message 'Unexpected error. An error happened while requesting a change'

** Steps To Reproduce**
Precondition: Student user with either no application or application
Steps to reproduce the behaviour:

Login as a student user
Click on 'Request a Change'
Scroll down to 'Application# field'
Type in any data
Select an option from the 'Request a change to*'

Additional context
GDX Discovery Feedback

need to reconfirm this is still the case before moving ticket forward 2024/12/02


Add TypeScript recipe

I kept it simple. Feel free to provide feedback if I missed something or if I have to add some extra things.
@ivogabe Something you would like to add or improve?

Can you also add a link to the readme?

👍 after you've addressed my two minor comments

@sindresorhus What link? Link to the AVA readme? Can't find something similar in the other recipes so guess I'm a little confused :p.

@SamVerschueren Add it here: https://github.com/sindresorhus/ava#recipes

Damnit, just screwed up squasing my commits. Let me try to fix it.

Alright, don't gonna touch the commits anymore :). Not sure if I should add the outDir property to tsconfig.json?
@sindresorhus tips for squashing when you had to sync with the remote in between? It totally got screwed up the previous time :).

TypeScript users should already know how to use the outDir option, so it should be fine without it too.

We can always improve depending on the feedback via twitter/gitter/issues.

tips for squashing when you had to sync with the remote in between?

Don't sync with git pull, but with git pull --rebase.

But don't worry. I'll squash when I merge.

@sindresorhus Alright, thanks for the tip :)!

Landed. I'd like to keep it simple as is. TypeScript will (should) know how to use the TSC options. Not the correct place to teach it here.
Thanks Sam!

Glad I could help :)

:+1:

Don't sync with git pull, but with git pull --rebase.

off topic
I'd like to chime in on this statement and say; put it in your global git config. Fire and forget. Be rid of any nonsense merge [remote]master into [local]X commits.
# git >= 1.7.9
git config --global pull.rebase true

# git < 1.7.9
git config --global branch.autosetuprebase always

I for one can't think of a time and place where a straight up git pull would be preferential. Sorry for the off topic comment!

Thanks @kasperlewau . Will save me some headaches in the future :).


Proposal: Integrate GraphiQL into GraphQL Services

Summary
This proposal is to integrate GraphiQL into Ballerina GraphQL services on demand. GraphiQL is the official reference implementation of GraphQL Integrated Development Environment(IDE) that provides a graphical view and querying facility for the service.
Goals

Integrate GraphiQL into Ballerina GraphQL Services.
Provide an easy way to test the Ballerina GraphQL APIs locally.

Motivation
GraphQL has several tools that can be integrated into a GraphQL library. To give a better development experience for the GraphQL users, most of the GraphQL libraries integrate GraphiQL which is a very popular tool among the GraphQL community. GraphiQL provides a graphical user interface to execute the GraphQL queries. Users will be able to use any kind of complex GraphQL queries with GraphiQL. This can be used for testing purposes and to learn and understand the GraphQL query language as well. GraphiQL displays the schema of the service in Schema Definition Language(SDL) which is an important feature, especially for code first approach libraries like Ballerina GraphQL. Also, this can be used as a debugging tool for GraphQL APIs.
Description
GraphQL Foundation provides multiple ways to implement a GraphiQL client. This proposal proposes to include the GraphiQL client as a single-page web application served from the Ballerina server using the existing CDN assets. An example implementation of the web app can be found in GraphiQL examples. The web app can be saved as a single HTML file inside the Ballerina GraphQL package. Developers can enable/disable the GraphiQL client and configure the path where the GraphiQL is served.
GraphiQL Configurations
Even though GraphiQL is an essential tool, it will be disabled in the production level APIs due to security concerns. Hence, the GraphQL service accepts a separate set of configurations for the GraphiQL client. With these configurations, the user will be able to enable or disable the client easily. Configurations can be sent via Ballerina GraphQL service configuration. It has a separate field for GraphiQL configurations. It accepts a record as the input and it consists of a mandatory field and an optional field.
type graphiql record {
    boolean enable;
    string path = "/graphiql";
};

In this GraphiQL configuration record, the field enable accepts a boolean that denotes whether the client is enabled or not. By default, it has been set to false. The optional field path accepts a valid string path for the GraphiQL service. The path can be a valid string with a leading forward slash. The default path is /graphiql. If the GraphQL service is configured to the same path as GraphiQL path, an error will be thrown when the GraphiQL is enabled.
CORS Configurations
The web browser may not allow to access the GraphQL endpoints via the web app without  CORS configurations. Therefore, it’s mandatory to set up CORS configurations to the GraphQL service. There are two main approaches to configure the CORS in GraphQL service which enables GraphiQL.
The first method is to set up CORS configurations manually by the developer and enforce them in case of missing by a compile-time warning. If the GraphiQL client enables in a particular path, the origin of the GraphiQL client should be added to the GraphQL CORS configurations. CORS configurations can be easily set up by using the service configurations in Ballerina GraphQL. In case of missing CORS configurations, the developer will be warned at the compile time. A sample configuration setup is given below.
@graphql:ServiceConfig {
     cors: {
         allowOrigins: ["graphql-service-url/{path}"]
     },
     graphiql: {
         enable: true,
         path: "/user-specific-path"
     }
}

The other approach is to handle this internally and allow origins for the particular host of the GraphiQL client. Therefore the developer only has to provide the GraphiQL configurations.
@graphql:ServiceConfig {
     graphiql: {
         enable: true,
         path: "/user-specific-path"
     }
}

If the configurations are set up correctly, the web app will be served at the given path when the service starts. The developer will be able to access the web application using a web browser.

I think the second approach is better since compiler warning does not force it completely. This can lead to misunderstandings and some new/inexperienced users may find it hard.
It also enables us to configure CORS specifically for the resource that serves the GraphiQL, not the entire GraphQL service, which is a plus point.

Yeah, I also prefer the second approach.

Updated the proposal as per the discussions.

@DimuthuMadushan I guess none CDN approach is a Non-Goal of this proposal ?

@shafreenAnfar yes. added to the proposal.

@sameerajayasoma FYI.

Apologies for the late reply.
I would prefer to enable the GraphiQL endpoint using a configurable variable. Hardcoding GraphiQL config in the code is a bad idea, especially since it should not be exposed in production. Here is how I would design this.
Define configurable variables in ballerina/graphql package. I just came up with the following variable names. Need to figure out better names if we are going ahead with this design.
// Option 1
configurable boolean graphiqlEnable = false;
configurable string graphiqlPath = "graphiql";

// Option 2
type Graphiql record {
    boolean enable = false;
    string path = "/graphiql";
};

configurable Graphiql graphiql = {};

The advantage of option 1 is that the configurable values can be specified in the command line.
java -jar gqlsvc.jar -CgraphiqlEnable=true

Thank you @sameerajayasoma for the suggestion. I have tried option 1 locally and found no issues with that design.
Configurable variables:
public configurable boolean graphiql = false;
public configurable string graphiqlPath = "graphiql";

Execution commands:
bal run -- -Cballerina.graphql.graphiql=true -Cballerina.graphql.graphiqlPath=graphical

java -jar gqlsvc.jar -Cballerina.graphql.graphiql=true -Cballerina.graphql.graphiqlPath=graphical

Would like to know suggestions on this and whether we proceed with this design. @sameerajayasoma @shafreenAnfar @ThisaruGuruge

Looks good.
How about the following variable names?
public configurable boolean enableGraphiql = false;
public configurable string graphiqlPath = "graphiql";

The most commonly used configurable variable would be the first one.
java -jar gqlsvc.jar -Cballerina.graphql.enableGraphiql=true

+1 for the above two variable names. I guess the same would work for bal run as well.

When it comes to testing, currently we have these test services with different forms of GraphiQL configurations. With the new design, It seems like we don't have a way to provide configurations like earlier. @ThisaruGuruge any idea on this?

When it comes to testing, currently we have these test services with different forms of GraphiQL configurations. With the new design, It seems like we don't have a way to provide configurations like earlier. @ThisaruGuruge any idea on this?

In that case, will it be okay to keep it as it is @sameerajayasoma? Otherwise we might have to test this manually for each release and it might leave a window for human error? WDYT?

Looping @azinneera and @warunalakshitha. Do we have a way to provide different configurable values in test cases?

We can provide different values for configurable variables for tests by adding a Config.toml inside tests directory. That will apply for all the tests in that module.
But if we cannot provide separate configurable values for different test cases in same test module.

Adding on to the @warunalakshitha 's comment, this requirement was raised sometime ago for an Observability use case as well. There is an open spec issue to track this. I think we should check the feasibility of implementing @manuranga 's suggestion to address this: https://github.com/ballerina-platform/ballerina-spec/issues/762#issuecomment-785274601

@sameerajayasoma Given that we don't have a proper way to add test-cases. Shall we revert back to the original proposal as @ThisaruGuruge mentioned in https://github.com/ballerina-platform/ballerina-standard-library/issues/2755#issuecomment-1115732188 ?
It is true that there is a slight inconsistency between the two types of configuration. However, IMO, when it comes to user experience both types of approaches have pros and cons.

I think we are mixing two different things: design and implementability, and we have to adjust the design to make it implementable in some situations.  The proposal is to change the design because we can't write unit tests :)
Anyway, I see two options here:

Delay this feature until we can pass different configurable values to test functions
Go with the original proposal.

As I've explained in https://github.com/ballerina-platform/ballerina-standard-library/issues/2755#issuecomment-1105710198, we are mixing two kinds of configuration elements into graphql:ServiceConfig record.
I prefer option #1, but given the circumstances, let's go with option 2.

Closed since agreed to go with the original proposal.


Docs: clarification of "loop=None' defaults

Lots of asyncio primitives and operations have a keyword argument loop=None. I cannot find an explanation of it in the docs (doesn't mean it doesn't exist, just that I can't find it). Reading the source yields the following: The optional event_loop argument allows explicitly setting the event loop object used by the future. If it's not provided, the future uses the default event loop (for the current context).
For me personally, this is pretty unclear, especially when running multiple event loops. I think I've figured it out, but asyncio would be easier to learn if it were better documented. Specifically, (and again for me personally), important questions that would be helpful to answer in the docs are:

What behavior does loop=None effect? eg, "The optional loop argument allows explicitly setting the event loop the future is 'run' in. Passing None will use the default loop for the current context, as determined by asyncio.get_event_loop().
What exactly is meant by "the current context"? (Should this be a separate issue?) Reading the source (asyncio.events.py):

def get_event_loop(self):
"""Get the event loop.
This may be None or an instance of EventLoop.
"""

if (self._local._loop is None and
    not self._local._set_called and
    isinstance(threading.current_thread(), threading._MainThread)):
    self.set_event_loop(self.new_event_loop())

if self._local._loop is None:
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)

return self._local._loop
```
I'm pretty sure that means "the current thread". Disambiguation here would be very helpful, especially for those of us mixing threading with asyncio (again, a very important use case will be running multiple event loops).

Ideally, including some helpful yardstick about when you should consider passing the loop explicitly would help clear up some uncertainty surrounding the lay of the land. I'm hesitant to use the default value of None, even though it cleans up my coro signatures, I think because I'm unclear on the internals of the asyncio primitives and how they interact with threads. I'm aware they aren't threadsafe, but lacking an understanding of what makes them un-threadsafe, I'm unsure of what situations do, and do not, warrant explicitly setting the loop. I'm pretty sure I understand it, but there's enough uncertainty for me that I'm pretty much just always explicitly setting the loop, because "better safe than sorry".

Cheers!

Yes, (1) is pretty much on the mark.
Re (2), we intentionally don't say too much about "current context" because
its definition is actually dependent on the implementation of the (global)
event loop policy, which defines the behavior of get_event_loop(),
set_event_loop() and new_event_loop(). The default policy supports only one
loop per thread and requires an explicit set_event_loop(new_event_loop())
call for all threads except the main thread (where the first
get_event_loop() call implies the latter).
Re (3), I would first start by discussing a yardstick for when to have
multiple event loops per thread. I personally believe this should be
essentially never, because asyncio was designed with that assumption --
explicit manipulation of the event loop is considered mostly useful for
writing asyncio's own test suite and perhaps for platforms that integrate
an asyncio event loop with their system's UI event handling.
On Mon, Jun 20, 2016 at 10:36 AM, Nick Badger<EMAIL_ADDRESS>wrote:

Lots of asyncio primitives and operations have a keyword argument
loop=None. I cannot find an explanation of it in the docs (doesn't mean
it doesn't exist, just that I can't find it). Reading the source yields the
following: The optional event_loop argument allows explicitly setting the
event loop object used by the future. If it's not provided, the future uses
the default event loop (for the current context).
For me personally, this is pretty unclear, especially when running
multiple event loops. I think I've figured it out, but asyncio would be
easier to learn if it were better documented. Specifically, (and again for
me personally), important questions that would be helpful to answer in the
docs are:

What behavior does loop=None effect? eg, "The optional loop
argument allows explicitly setting the event loop the future is 'run' in.
Passing None will use the default loop for the current context, as
determined by asyncio.get_event_loop().

What exactly is meant by "the current context"? (Should this be a
separate issue?) Reading the source (asyncio.events.py):
def get_event_loop(self):"""Get the event loop.This may be None or an instance of EventLoop."""
if (self._local._loop is None and
not self._local._set_called and
isinstance(threading.current_thread(), threading._MainThread)):
self.set_event_loop(self.new_event_loop())
if self._local._loop is None:
raise RuntimeError('There is no current event loop in thread %r.'
% threading.current_thread().name)
return self._local._loop
I'm pretty sure that means "the current thread". Disambiguation here
would be very helpful, especially for those of us mixing threading with
asyncio (again, a very important use case will be running multiple event
loops).
3. Ideally, including some helpful yardstick about when you should
consider passing the loop explicitly would help clear up some uncertainty
surrounding the lay of the land. I'm hesitant to use the default value of
None, even though it cleans up my coro signatures, I think because I'm
unclear on the internals of the asyncio primitives and how they interact
with threads. I'm aware they aren't threadsafe, but lacking an
understanding of what makes them un-threadsafe, I'm unsure of what
situations do, and do not, warrant explicitly setting the loop. I'm pretty
sure I understand it, but there's enough uncertainty for me that I'm pretty
much just always explicitly setting the loop, because "better safe than
sorry".
Cheers!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/python/asyncio/issues/362, or mute the thread
https://github.com/notifications/unsubscribe/ACwrMk09SPX54hCnaokljaW1XiNr1l65ks5qNs-ygaJpZM4I58LB
.

--
--Guido van Rossum (python.org/~guido)

(1): awesome. If nobody gets around to it by then, I may be able to take care of that in the next few weeks, assuming someone can point me the way for contribution (doc quality requirements, pull request to where, etc)
(2): I thought that might be the case, given its separation from AbstractEventLoopPolicy. But, isn't the ambiguity still a barrier to understanding? Perhaps an appropriate compromise might be to add an explanation in the AbstractEventLoopPolicy.get_event_loop documentation that says something to the effect of "The current context is defined by the specific event loop implementation. For the event loops available within asyncio, the current context is equivalent to the current thread. For third-party event loops, this may not be the case." For an added bonus, that section could also be linked from anywhere that mentions "current context".
(3) To be completely honest, it hadn't even occurred to me that you could have multiple event loops per thread. That also strikes me as particularly messy. I was implying that the event loop was happening in a different thread (but the same process). There are more than a few reasons that could happen; in my case I'm using two event loops so I can separate semi-ephemeral transactions (sending and receiving on long-lived websockets connections) from very-long-lived asynchronous message transactions (as an example, imagine awaiting an email response). I suppose there's a case to be made that I should combine these into the same event loop, but it very severely impacts the composability of code in my particular case to do so.
A more immediate and definitive example would be running a third-party library synchronously, while using the event loop to handle IO. Some libraries, eg Kivy, must be run in the main thread. So I can imagine someone using Kivy for UI and aiohttp to connect or provide some web service, and then dealing with the aiohttp event loop from the kivy (main) thread would then require explicit loop declarations. Note that this would entail a lot of creativity and the thread boundaries, and many calls to the various _threadsafe functions asyncio provides, but I could definitely see it happening.
Does my concern there make sense? I have at this point a pretty good understanding of when I need to pass the loop explicitly, but I've only figured that out after a lot of experimentation and trial+error. That learning curve could be substantially eased by a note somewhere about when it's useful to pass loop=<foo> explicitly.
I should also hedge this whole thing by saying that my understanding of the internals of the event loops is very limited, so (in particular re: multiple event loops per process by not thread) I may be way off-base.

(1) For docs we still use Hg, just submit your patch to bugs.python.org
(more instructions at https://docs.python.org/devguide/).
(2) But the distinction is not up to the event loop -- the policy is a
separate object. You can have a new loop without a new policy, and vice
versa. It may be reasonable to say that "current context" is the same as
"current thread" unless the event loop policy has been changed (in which
case the semantics are entirely up to the new policy object).
(3) All communication between loops running in different threads should use
loop.call_soon_threadsafe(), and you should avoid any other explicit use of
event loops. If you're not doing it that way you're asking for trouble.
Given that your "understanding of the internals of the event loops is very
limited" you should just not do this.
On Mon, Jun 20, 2016 at 2:20 PM, Nick Badger<EMAIL_ADDRESS>wrote:

(1): awesome. If nobody gets around to it by then, I may be able to take
care of that in the next few weeks, assuming someone can point me the way
for contribution (doc quality requirements, pull request to where, etc)
(2): I thought that might be the case, given its separation from
AbstractEventLoopPolicy. But, isn't the ambiguity still a barrier to
understanding? Perhaps an appropriate compromise might be to add an
explanation in the AbstractEventLoopPolicy.get_event_loop
https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.AbstractEventLoopPolicy.get_event_loop
documentation that says something to the effect of "The current context is
defined by the specific event loop implementation. For the event loops
available within asyncio, the current context is equivalent to the current
thread. For third-party event loops, this may not be the case." For an
added bonus, that section could also be linked from anywhere that mentions
"current context".
(3) To be completely honest, it hadn't even occurred to me that you could
have multiple event loops per thread. That also strikes me as
particularly messy. I was implying that the event loop was happening in a
different thread (but the same process). There are more than a few reasons
that could happen; in my case I'm using two event loops so I can separate
semi-ephemeral transactions (sending and receiving on long-lived websockets
connections) from very-long-lived asynchronous message transactions (as an
example, imagine awaiting an email response). I suppose there's a case to
be made that I should combine these into the same event loop, but it very
severely impacts the composability of code in my particular case to do so.
A more immediate and definitive example would be running a third-party
library synchronously, while using the event loop to handle IO. Some
libraries, eg Kivy, must be run in the main thread. So I can imagine
someone using Kivy for UI and aiohttp to connect or provide some web
service, and then dealing with the aiohttp event loop from the kivy (main)
thread would then require explicit loop declarations. Note that this would
entail a lot of creativity and the thread boundaries, and many calls to the
various _threadsafe functions asyncio provides, but I could definitely
see it happening.
Does my concern there make sense? I have at this point a pretty good
understanding of when I need to pass the loop explicitly, but I've only
figured that out after a lot of experimentation and trial+error. That
learning curve could be substantially eased by a note somewhere about when
it's useful to pass loop= explicitly.
I should also hedge this whole thing by saying that my understanding of
the internals of the event loops is very limited, so (in particular re:
multiple event loops per process by not thread) I may be way off-base.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/python/asyncio/issues/362#issuecomment-227273157, or mute
the thread
https://github.com/notifications/unsubscribe/ACwrMn17ZKui8VtqHotpYId4VW7Vkqxnks5qNwQogaJpZM4I58LB
.

--
--Guido van Rossum (python.org/~guido)

(1): 👍 I'll see what I can do.
(2): Gotcha, I didn't realize the policy was that loosely coupled with the loop. What about "The current context is defined by the specific event loop policy. Typically, 'current context' is equivalent to 'current thread'. If the policy has changed, the meaning of 'current context' may change as well."
(3) The safety of my use of asyncio is grossly off-topic; I understand that bridging the thread boundary requires use of the threadsafe methods, and I also understand that ignoring thread safety for the event loops is very much caveat emptor. What I'm hoping the docs would clarify, is why explicit setting of the event loop when creating asyncio objects, ex. foo = asyncio.Lock(*, loop=bar), would ever be needed, given that the above are the case. To me (and I'm sure others), the existence of the loop keyword argument suggests that the objects can be created from different loops and/or threads. If that isn't possible, it needs to be documented; the big "unless otherwise noted these aren't threadsafe" for asyncio as a whole seems insufficient when confronted by the ambiguity of the loop keyword.

(2) I'd prefer stating what the default policy does and explaining that
each policy has its own interpretation.
(3) The exact conditions are too hard to explain; the simplified rule is
"don't use this".
On Mon, Jun 20, 2016 at 3:44 PM, Nick Badger<EMAIL_ADDRESS>wrote:

(1): 👍 I'll see what I can do.
(2): Gotcha, I didn't realize the policy was that loosely coupled with the
loop. What about "The current context is defined by the specific event loop
policy. Typically, 'current context' is equivalent to 'current thread'. If
the policy has changed, the meaning of 'current context' may change as
well."
(3) The safety of my use of asyncio is grossly off-topic; I understand
that bridging the thread boundary requires use of the threadsafe methods,
and I also understand that ignoring thread safety for the event loops is
very much caveat emptor. What I'm hoping the docs would clarify, is why
explicit setting of the event loop when creating asyncio objects, ex. foo
= asyncio.Lock(*, loop=bar), would ever be needed, given that the above
are the case. To me (and I'm sure others), the existence of the loop
keyword argument suggests that the objects can be created from different
loops and/or threads. If that isn't possible, it needs to be documented;
the big "unless otherwise noted these aren't threadsafe" for asyncio as a
whole seems insufficient when confronted by the ambiguity of the loop
keyword.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/python/asyncio/issues/362#issuecomment-227292392, or mute
the thread
https://github.com/notifications/unsubscribe/ACwrMprYdPYmlQGuJLobPdhTcb9CtnQFks5qNxfWgaJpZM4I58LB
.

--
--Guido van Rossum (python.org/~guido)


Allow GithubRelease update stage in Generic to fetch other release tags

This is not for requesting support for new games/applications
To do this you should go to https://github.com/CubeCoders/AMPTemplates and first attempt to build a configuration yourself - otherwise you can request a template from this repo.
Feature Request
Feature Information:

It would be handy if the GithubRelease update stage in Generic could fetch releases that are not the latest, by specifying the relevant version tag in UpdateSourceVersion.
If UpdateSourceVersion is null or empty, AMP should just fetch the latest release as currently.
I confirm:

[x] that I have searched for an existing feature request matching the description.

Actually, I note that the Generic module wiki claims that AMP already does this. It does not. So maybe this should be a bug report instead...
Eg logs:
[02:04:19] [Generic:admin Debug]  : Running update/pre-start stage Server Download (GithubRelease server-release.jar Anuken/Mindustry v138)
[02:04:19] [Generic:admin Debug]  : Fetching repo metadata from https://api.github.com/repos/Anuken/Mindustry/releases/latest...
[02:04:20] [Generic:admin Debug]  : Running update/pre-start stage  (FetchURL https://github.com/Anuken/Mindustry/releases/download/v143.1/server-release.jar  )
[02:04:20] [Core:admin Debug]     : Downloading https://github.com/Anuken/Mindustry/releases/download/v143.1/server-release.jar, saving to /tmp/tmp7dcb05f9.tmp
[02:04:21] [Core:admin Debug]     : File already exists: /home/amp/.ampdata/instances/Mindustry01/mindustry/server-release.jar, deleting...
[02:04:21] [Core:admin Debug]     : Moving /tmp/tmp7dcb05f9.tmp to /home/amp/.ampdata/instances/Mindustry01/mindustry/server-release.jar...

AMP clearly registers the UpdateSourceVersion data, but ignores it when downloading the release.

Implemented in CI, if the filename is known then setting the version sets the tag being used. Otherwise, it sets the release ID.


fixed issue with attempting to load data from an empty directory

Resolves issue #95 by checking that the latest directory contains at least 1 file.

That change looks good, I just committed our suggestion.

Maybe we'll extend the Filesystem interface later and add a function like LatestRecordDirPath so we can move this filesystem-related logic into the fs package.

Yes, I wasn't sure where the best place to put these helper functions would be, so I put them in the timetrace.go file. I like this idea better though.

This fix is contained in release 0.7.1.


Polar exception on disconnect

The polar plugin throws an
com.polar.androidcommunications.api.ble.exceptions.BleDisconnected
exception on disconnect. Called from the confirmation popup.

This exception also happens if you physically turn off the Polar device.


[OSDEV-1325] CI/CD. Trigger the 'Deploy to AWS' pipeline using the API.

“Deploy to AWS” pipeline will init from “[Release] Deploy” pipeline and get deployment parameters, such as cleaning OpenSearch indexes, by trigger.

Hi, @vladsha-dev

Could you please handle "Changes to RELEASE-PROTOCOL, RELEASE-NOTES, and removal TO DO" within this PR?

done


Updating to latest OpenJPH breaks encoder

When updating the OpenJPH submodule to the latest commit, test encoding throws the following error:
RuntimeError: null function or function signature mismatch
    at wasm://wasm/000a9b56:wasm-function[46]:0x94c
    at wasm://wasm/000a9b56:wasm-function[54]:0x129f
    at wasm://wasm/000a9b56:wasm-function[72]:0x2c5c
    at wasm://wasm/000a9b56:wasm-function[159]:0xff13
    at invoke_iiii (/workspaces/openjphjs/dist/openjphjs.js:1:60705)
    at wasm://wasm/000a9b56:wasm-function[185]:0x14b24
    at wasm://wasm/000a9b56:wasm-function[109]:0x75c1
    at HTJ2KEncoder.HTJ2KEncoder$encode [as encode] (eval at new_ (/workspaces/openjphjs/dist/openjphjs.js:1:36933), <anonymous>:8:1)
    at encode (/workspaces/openjphjs/test/node/index.js:42:15)
    at openjphjs.onRuntimeInitialized (/workspaces/openjphjs/test/node/index.js:63:3)

I suspect it is line 248 in openjphjs/src/HTJ2KEncoder.hpp.
codestream.write_headers(&encoded_); signature has changed.
This line should be codestream.write_headers(&encoded_, NULL, 0);
give it a try and it works we need to change openjphjs

@jmhmd Please ignore my earlier comment.
There was a bug in the OpenJPH library; a function pointer was not set to its correct value -- it was set to NULL.
It compiles and run now.

Resolved with  https://github.com/chafey/openjphjs/pull/8


Plugin not compatible with CRA 5

CRA 5 updates WebPack to version 5 and the new WebPack version removed namedModules and namedChunks from the optimization configuration object. More details can be found on this page https://webpack.js.org/migrate/5/.
When upgrading a project using this CRACO plugin to CRA5 the following error happens:
Creating an optimized production build...
Failed to compile.

Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration.optimization has an unknown property 'namedChunks'. These properties are valid:
   object { checkWasmTypes?, chunkIds?, concatenateModules?, emitOnErrors?, flagIncludedChunks?, innerGraph?, mangleExports?, mangleWasmImports?, mergeDuplicateChunks?, minimize?, minimizer?, moduleIds?, noEmitOnErrors?, nodeEnv?, portableRecords?, providedExports?, realContentHash?, removeAvailableModules?, removeEmptyChunks?, runtimeChunk?, sideEffects?, splitChunks?, usedExports? }
   -> Enables/Disables integrated optimizations.
   Did you mean optimization.chunkIds: "named" (BREAKING CHANGE since webpack 5)?

Pull Request #17 was opened with the necessary changes to support CRA5 / webpack 5.


How to deconstruct code into tokens to extract functions and comments?

I want to make a code search corpus. I have collected a lots of GitHub repositories. Now I need to deconstruct code into tokens to extract functions and comments. You describe in the paper CodeSearchNet Challenge Evaluating the State of Semantic Code Search: We then tokenize all Go, Java, JavaScript, Python, PHP and Ruby functions (or methods) using TreeSitter — GitHub’s universal parser — and, where available, their respective documentation text using a heuristic regular expression.
I can extract functions in python. But it hasn't comments. How do you extract functions with comments? Can you share your codes?

You can find all our parsing code here.

You can find all our parsing code here.

Thank you for your reply! I have try the function parer in CodeSearchNet/function_parser/ folder. But I met some problems:

What is the input? In the examples, the input is library keras-team/keras. Is it https://github.com/keras-team/keras? But it's a repository. Is it one repository per input?

What is the output? The output in the examples is

{     'nwo': 'keras-team/keras',     'sha': '0fc33feb5f4efe3bb823c57a8390f52932a966ab',     'path': 'keras/layers/core.py',     'language': 'python',     'identifier': 'Activation.__init__',     'parameters': '(self, activation, **kwargs)',     'argument_list': '',     'return_statement': '',     'docstring': '',     'function': 'def __init__(self, activation, **kwargs):\n        super(Activation, self).__init__(**kwargs)\n        self.supports_masking = True\n        self.activation = activations.get(activation)',     'url': 'https://github.com/keras-team/keras/blob/0fc33feb5f4efe3bb823c57a8390f52932a966ab/keras/layers/core.py#L294-L297' }
The path is just a core.py file in library keras-team/keras. How do I set the file to parse? By dependee = "keras-team/keras"?


api: add support for filtering by website category_code

This is a missing feature in the list measurement API endpoint. It's a requirement to being able to properly link measurements from the relevant MAT pages.

This has been implemented. Closing