sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: optimize overhead from CPU feature detection
Labels: Performance,NeedsInvestigation,compiler/runtime

As investigated in https://github.com/golang/go/issues/36196, the overhead of checking for hardware FMA on every iteration of a loop causes it to slow down. @josharian's [CL 212360](https://golang.org/cl/212360), which introduces a `HasCPUFeature ` intrinsic, somewhat alleviates this overhead, but it is still non-negligble. We should look into lowering or in some cases eliminating the overhead for operations that require CPU feature detection, like population count, FMA, rounding, SSE3, etc...

One method is to hoist the check outside the loop. To quote https://github.com/golang/go/issues/15808#issuecomment-568224699

> we’d need an optimization that rewrote:
> ```
> var b bool = ...
> for ... {
>   if b {
>     ...
>   } else {
>     ...
>   }
> }
> ```
> into
> ```
> var b bool = ...
> if b {
>   for ... {
>     ...
>   }
> } else {
>   for ... {
>     ... 
>   }
> }
> ```
> Which is not always going to be an improvement.

For large loops and operations that permit > 2 implementations, the above optimization could result in inflated binaries, but it works well for smaller loops.

Another method is to set a function pointer to the preferred implementation on program initialization, so that all invocations incur an indirect function call overhead, with the benefit that the implementation wouldn't change at runtime. This would be akin to the dispatcher in GCC's [function multi-versioning](https://lwn.net/Articles/691932/).

It is worth further investigating opportunities for optimization in this space.
Repository: flutter
Issue: PageController should be ValueListenable<double>
Labels: c: new feature,framework,f: scrolling,c: proposal,P3,team-framework,triaged-framework

PageController used in PageView widget, should implement ValueListenable, so it could be used in concert with ValueListenableBuilder to synchronize page switching with other "animations" on the screen.

Workaround is straightforward, but it shouldn't be necessary at all.

```
class ListenableController extends ValueListenable<double> {
  final PageController pageController;

  ListenableController(this.pageController);

  @override
  void addListener(listener) {
    pageController.addListener(listener);
  }

  @override
  void removeListener(listener) {
    pageController.removeListener(listener);
  }

  @override
  get value => pageController.page;
}
```

Now I can slide to the next page while building the content of that next page with some cool animation using ValueListenableBuilder.
Repository: rust
Issue: Macro expansion of rental! macro using --pretty=expanded generates uncompilable code
Labels: A-pretty,C-bug

I filed a `cbindgen` bug on this issue [here](https://github.com/eqrion/cbindgen/issues/444), but I believe this is an underlying rustc issue with macro expansion.

What appears to be happening is that the `rental!` macro is generating a number of type bounds via `quote_spanned!` that successfully compile, but cannot be expanded to compilable code.

Attached is a minimal repro for this bug and a playground link containing the expanded macro output. Notice this oddly generated code which seems to come from `rental` here: https://github.com/jpernst/rental/blob/master/rental-impl/src/lib.rs#L423

```        #[doc =
          r" The closure may return any value not bounded by one of the special rental lifetimes of the struct."]
        pub fn rent<__F, __R>(&self, f: __F) -> __R where
         __F: for<'t, 'm> __rental_prelude::FnOnce(&'t (Foo<'m, i32>)) -> __R,
         __R {
            f(&self.t)
        }
```

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ac7e0dde8adb6601a553502c6d6caf6f

Minimal repro: [repro.zip](https://github.com/eqrion/cbindgen/files/4013627/repro.zip)
Repository: flutter
Issue: flutter_driver - Capture Native UI Elements in Screenshots
Labels: c: new feature,framework,t: flutter driver,c: proposal,P3,team-framework,triaged-framework

## Use case

I am using the `screenshots` library which uses the `flutter_driver`'s screenshot method to capture screenshots which will be used on the app stores. On iOS, when the on-screen keyboard is displayed on the device and a screenshot is captured, the area where the keyboard appears displays as a black box (e.g. missing from the screenshot). The same appears for the top status bar with the network & battery indicators.

Having the ability to capture exactly what's on the device would be helpful in creating quality release screenshots.

## Proposal

Update `flutter_driver`'s screenshot functionality to capture the entire screen, versus what is rendered by flutter.

Screenshot showing a comparison between the iOS Simulator screenshot & flutter_driver screenshot: 
![Screenshot of an app with keyboard opened](https://res.cloudinary.com/tnoorcorp/image/upload/v1577919484/Simulator_Screen_Shot_-_iPhone_11_Pro_-_2020-01-01_at_17.52.50.png "iOS Screenshot")
Repository: flutter
Issue: Expose ImplicitlyAnimatedWidget's onEnd callback on Material
Labels: framework,a: animation,f: material design,c: proposal,team-design,triaged-design

**Use case**: Responding to Material's implicit animations as in `AnimatedContainer`, etc

**Proposal**: `Material` wraps `_MaterialInterior` which `extends ImplicitlyAnimatedWidget`, so I believe all we need to do is add the `VoidCallback onEnd` argument to `Material` and pass it through
Repository: go
Issue: proposal: encoding/gob: allow override type marshaling
Labels: Proposal

This is the equivalent change to `encoding/gob` as what's proposed in #5901 for `encoding/json`.

I propose adding the following methods:
```go
// RegisterFunc registers a custom encoder to use for specialized types.
// The input f must be a function of the type func(T) ([]byte, error).
//
// When marshaling a value of type R, the function f is called
// if R is identical to T for concrete types or
// if R implements T for interface types.
// Precedence is given to registered encoders that operate on concrete types,
// then registered encoders that operate on interface types
// in the order that they are registered, then the specialized marshal methods
// (i.e., GobEncode or MarshalBinary), and lastly the default behavior of Encode.
//
// It panics if T is already registered or if interface{} is assignable to T.
func (e *Encoder) RegisterFunc(f interface{})

// RegisterFunc registers a custom decoder to use for specialized types.
// The input f must be a function of the type func([]byte, T) error.
//
// When unmarshaling a value of type R, the function f is called
// if R is identical to T for concrete types or
// if R implements T for interface types.
// Precedence is given to registered decoders that operate on concrete types,
// then registered decoders that operate on interface types
// in the order that they are registered, then the specialized unmarshal methods
// (i.e., GobDecode or UnmarshalBinary), and lastly the default behavior of Decode.
//
// It panics if T is already registered or if interface{} is assignable to T.
func (d *Decoder) RegisterFunc(f interface{})
```

One such use case for this is to make `encoding/gob` compatible with higher-order Go types containing protobuf messages.
```go
enc := gob.NewEncoder(w)
enc.RegisterFunc(proto.Marshal)
enc.Encode(v)

dec := gob.NewDecoder(r)
dec.RegisterFunc(proto.Unmarshal)
dec.Decode(v)
```
Repository: rust
Issue: Tracking issue for RFC 2632, `impl const Trait for Ty` and `~const` (tilde const) syntax (`const_trait_impl`)
Labels: A-trait-system,T-lang,C-tracking-issue,A-const-eval,F-const_trait_impl,S-tracking-perma-unstable

**NOTE: See #110395, which tracks a planned rewrite of this feature's implementation**

This is the primary tracking issue for rust-lang/rfcs#2632.

The current RFC text can be found at https://internals.rust-lang.org/t/pre-rfc-revamped-const-trait-impl-aka-rfc-2632/15192

This RFC has not yet been accepted. It is being implemented on a provisional basis to [evaluate the potential fallout](https://github.com/rust-lang/rfcs/pull/2632#issuecomment-567699174).

cc https://github.com/rust-lang/rust/issues/57563

The feature gate is `const_trait_impl`.

### Components
* `#[const_trait]` attribute
* `impl const Trait`
* `T: ~const Trait`
* `append_const_msg` on `rustc_on_unimplemented`
* `#[derive_const]`
* `trait Destruct`

### Open issues

* [x] #88155
* [x] [this test](https://github.com/rust-lang/rust/blob/cb406848eccc3665dfadb241d94fe27137bd0dcb/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs) shows we can currently still call a `const fn` with a `Trait` bound even if the concrete type does not implement `const Trait`, but just `Trait`. This will fail later during evaluation. Some related discussion can be found in https://github.com/rust-lang/rust/pull/79287#discussion_r528341238
* [x] There are no tests for *using* a `const impl` without *defining* one without the feature gate enabled. This should be added before any `impl const` is added to the standard library.
* [x] We need some tests and probably code around `#[rustc_const_stable]` and `#[rustc_const_unstable]` so we can properly stabilize (or not) the constness of impls in the standard library
* [x] #79450 shows that with default function bodies in the trait declaration, we can cause non-const functions to exist in `impl const Trait` impls by leaving out these default functions
* [ ] We need to determine the final syntax for `~const`. (In the interim, we may want to switch this to use a `k#provisional_keyword` or similar.)
* [ ] If we need `#[default_method_body_is_const]`, determine the syntax for it instead of existing as an attribute
* [ ] `#[derive_const]` for custom derives (proc macros) #118304
* [ ] grep for `110395` and figure out what to do everywhere that issue is mentioned (this is old stuff left over from when the previous const trait impl was removed)


**When stabilizing: compiler changes are required**:

* [ ] Error against putting `rustc_const_unstable` attribute on `const` `impl`s as they are now insta-stable.
* [ ] Treat `default_method_body_is_const` bodies and `const` `impl` bodies as `stable` `const fn` bodies. We need to prevent accidentally stabilizing an implementation that uses unstable lang/lib `const fn` features. 
* [ ] Change Rustdoc to display `~const` bounds or what syntax we decided it to be.
Repository: flutter
Issue: CompositedTransformFollower expands infinitely in some cases
Labels: framework,d: api docs,has reproducible steps,P2,found in release: 3.3,found in release: 3.5,team-framework,triaged-framework

`CompositedTransformFollower` does not respect the box constraints of it's children.
Other users seemto have encountered this as well, but haven't raised issues -

[this medium post](https://medium.com/saugo360/https-medium-com-saugo360-flutter-using-overlay-to-display-floating-widgets-2e6d0e8decb9) notes that "`follower` tends to extend infinitely if not bounded."

## Steps to Reproduce
Pass `Overlay.of(context).insert` something like
```dart
OverlayEntry(
  builder: (context) {
    return CompositedTransformFollower(
        link: this._layerLink,
        child: Container(color: Colors.pink, width: 50, height: 50),
      ),
    );
  },
);
```
The container should expand without bounds.

I [worked around this issue](https://gist.github.com/micimize/7579a66861cf56ba241b224a64566d51) by throwing a bunch of fitted boxes into the layout:
```dart
FittedBox(
  fit: BoxFit.cover,
  child: CompositedTransformFollower(
    link: this._layerLink,
    child: FittedBox(
      fit: BoxFit.none,
      child: widget.overlay,
    ),
  ),
);
```
Repository: godot
Issue: Transform notifications (NOTIFICATION_TRANSFORM_CHANGED) are no longer received once a Tween has been used
Labels: bug,confirmed,documentation,topic:2d

**Godot version:**
3.1.2 (Mono)

**OS/device including version:**
Windows 10

**Issue description:**
If a Tween is used to translate a node (or a parent of that node), then notifications of type `NOTIFICATION_TRANSFORM_CHANGED` stop being sent for that node.

I am unsure if other notifications are also interfered with.

**Steps to reproduce:**
1. Listen for transformation changes on a node by calling `set_notify_transform(true)`.
2. Scale the node with the 'scale' property, and notice a transformation notification is received (via the `func _notification(what):` callback).
3. Use a tween to adjust the `scale` property on the same node . Notice no transformation notification is received.
4. (Optional) Scale the node again directly with `scale` property. Notice no transformation notification is received.

**Minimal reproduction project:**
[Testing-TweenNotification.zip](https://github.com/godotengine/godot/files/4014799/Testing-TweenNotification.zip)
Object listening for notifications is in `ListeningNode.gd`. Tween via code in `Scene.gd`.
Repository: react-native
Issue: [Android] skew transform not working
Labels: Platform: Android,Bug

## Steps To Reproduce

1. Try to set `skewX` for View component: `transforms: [{ skewX: '45deg' }}`
3. Doesn't change the skew of View on Android (works on iOS)

### Describe what you expected to happen:
Basically `skewX` doesn't apply any skew on the view on Android.
Here is comparison between iOS/Android:
> also `skewY` doesn't render same as on iOS (which looks more correct)
<img width="779" alt="Screenshot 2020-01-02 at 2 13 00 PM" src="https://user-images.githubusercontent.com/5339061/71653948-044a8f80-2d6a-11ea-852c-c6814d8dc84a.png">


### React Native version:
```
System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 1.50 GB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
    Yarn: 1.19.1 - ~/.yarn/bin/yarn
    npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 25, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5
```

### Related issues
- [x] https://github.com/facebook/react-native/issues/12212

### Snack demo

https://snack.expo.io/@usrbowe2/e9b920

### Resources
In case anyone interested, here is the source code for skew code:
1. This is called for SkewX: `MatrixMathHelper.applySkewX(helperMatrix, convertToRadians(transform, transformType));` in file: `Libraries/StyleSheet/processTransform.js`
2. Which laters uses this matrix helper to apply transformation:
https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java
Repository: rust
Issue: Add a rustdoc flag to show the source code externally
Labels: T-rustdoc,C-feature-request

One of the features of docs.rs is [to show the source code in its UI](https://docs.rs/crate/lazy_static/1.4.0/source/src/lib.rs), but rustdoc [provides its own view of the source](https://docs.rs/lazy_static/1.4.0/src/lazy_static/lib.rs.html) as well. This duplication is both confusing for the user, but also duplicates the amount of storage docs.rs uses to store source code.

It'd be nice to have a rustdoc flag (unstable is fine) like `--source-code-base`, that prevents rustdoc from emitting the source pages on its own and replaces the `[src]` links with links to the source code base. For example, with `--source-code-base ../../crate/lazy_static/1.4.0/source`, the `[src]` for `lib.rs` would be `../../crate/lazy_static/1.4.0/source/src/lib.rs`, and rustdoc's own src page would be missing.

cc @GuillaumeGomez @jyn514
Repository: youtube-dl
Issue: https://coursehunter.net/
Labels: site-support-request

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2020.01.01**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video:https://coursehunter.net/course/udemy-vuejs-2
- Single video:https://coursehunter.net/course/udemy-vuejs-2
- Playlist: https://coursehunter.net/course/udemy-vuejs-2


## Description

<!--
there is required credentials 
-->

WRITE DESCRIPTION HERE
Repository: vue
Issue: Should `fill` and `copyWithIn` methods be intercepted (observed) now ?
Labels: feature request,discussion

### What problem does this feature solve?
`fill` and `copyWithIn` methods are also mutating methods and has Standard status currently [ECMAScript 2015 Language Specification – ECMA-262 6th Edition - copywithin](https://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.copywithin) , but they aren't being intercepted in https://github.com/vuejs/vue/blob/237294d88f65d65dcb790246394f1d37d64856a0/src/core/observer/array.js#L11-L19. Should they join now ? 

### What does the proposed API look like?
null

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: neovim
Issue: Opening more than one file of an sshfs mount fails on windows
Labels: bug,platform:windows,filesystem,network

I mounted a remote directory via SSHFS-Win (V2.7.17334) and WinFsp (2019.2).

Now when i open the first file in the mounted directory everything i tried worked as expected. Opening, writing, ... all work fine.

The problem arises when I try to open a second file on the same sshfs mount. On `:edit second-file` neovim if the file exist simply does nothing as far as i can see.
Opening and writing Files in other directories work fine, so does creating an empty buffer on the sshfs mount and writing it.
I also tried `:cd`-ing into the mount vs opening files with an absolute path to no avail.

I tried this with neovim 0.4.2 and the current nightly build 0.5.0-283-ga251b588a
Repository: TypeScript
Issue: Extend createMethodSignature and updateMethodSignature with 'modifiers' argument
Labels: Suggestion,In Discussion,API

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
updateMethodSignature, createMethodSignature

## Suggestion

<!-- A summary of what you'd like to see added or changed -->
It should be possible to provide an array of Modifiers (or `undefined`) to the `createMethodSignature` and `updateMethodSignature` functions.

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

When using the TypeScript compiler APIs, TypeScript provides numerous `create` and `update` functions that can be used to generate an AST, for example from Custom Transformers. However, for `MethodSignature`s, which may have modifiers such as the `static` keyword, there's no option to create or update their modifiers. This breaks [one of my libraries](https://github.com/wessberg/ts-clone-node) which sole purpose is to simply deep-clone a TypeScript node. A workaround is to manually patch the modifiers, however I hope this can be part of the function (as it is for others, like `createPropertySignature` and `updatePropertySignature`).

## Examples

<!-- Show how this would be used and what the behavior would be -->

```typescript
import {createMethodSignature, createNodeArray, createModifier, SyntaxKind} from "typescript";

createMethodSignature(
    createNodeArray([
        createModifier(SyntaxKind.StaticKeyword)
    ]),
    node.typeParameters,
    node.parameters,
    node.type,
    node.name,
    node.questionToken
);
```

However, the above example would be a breaking change since the first parameter expects a NodeArray of type parameters, so an alternative solution would be to accept it as the last argument.

## Checklist

My suggestion meets these guidelines:

* [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [X] This wouldn't change the runtime behavior of existing JavaScript code
* [X] This could be implemented without emitting different JS based on the types of the expressions
* [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: pytorch
Issue: Support Python builtins on iterators in JIT
Labels: oncall: jit,triaged

## 🚀 Feature
The exact example I stumbled upon, but there must be others:

```py
x: List[Tensor]
xrev = list(reversed(x)) # Fails because `reversed` expects only a Tensor in TorchScript
```

## Motivation

Lists of Tensors are somewhat supported in TorchScript and they do have their uses. But some builtins currently do not work with them, like `reversed`.

Plain Tensors cannot replace lists in every way (for example, what if I really don't want to allocate just to get all the elements in a list in one Tensor? What if the elements don't even fit by dimensionality?) so this's missing functionality.

## Pitch

For supported bulitins that support iterators, support List and Tuple values just as Tensors are supported.

## Alternatives

Not sure.

## Additional context

#18627

cc @suo