sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Better SIMD shuffles
Labels: A-LLVM,I-slow,C-enhancement,T-compiler,A-SIMD,C-optimization

I'm trying to do the following in AVX2 using intrinsics: shift `x` one byte to the right, while shifting the rightmost byte of `y` into the leftmost byte of `x`. This is best done using two instructions: `vperm2i128` followed by `vpalignr`. However, `simd_shuffle32` generates four instructions: `vmovdqa` (to load a constant), `vpblendvb`, then `vperm2i128` and `vpalignr`. Here is a a full example, which may be compiled with `rustc -O -C target_feature=+avx2 --crate-type=lib --emit=asm shuffle.rs`.

```
#![feature(platform_intrinsics, repr_simd)]

#[allow(non_camel_case_types)]
#[repr(simd)]
pub struct u8x32(u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8, u8);

extern "platform-intrinsic" {
    fn simd_shuffle32<T, U>(x: T, y: T, idx: [u32; 32]) -> U;
}

pub fn right_shift_1(left: u8x32, right: u8x32) -> u8x32 {
    unsafe { simd_shuffle32(left, right, [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62]) }
}
```

This might be considered a bug in LLVM, in the sense that it's generating a sub-optimal shuffle. However, I think it should be addressed in rustc, because if I know what the right sequence of instructions is then I shouldn't have to hope that LLVM can generate it. Moreover, it's possible to get the right code from clang (compile with `clang -emit-llvm -mavx2 -O -S shuffle.c`):

```
#include <immintrin.h>
__m256i right_shift_1(__m256i left, __m256i right)
{
    __m256i new_left = _mm256_permute2x128_si256(left, right, 33);
    return _mm256_alignr_epi8(new_left, right, 1);
}
```

A possibly interesting observation is that the unoptimized LLVM IR from clang contains a `llvm.x86.avx2.vperm2i128` intrinsic followed by a `shufflevector`. The optimized LLVM IR from clang contains two `shufflevector` intrinsics. In order to try to get the same output from rustc, I first patched it to support `llvm.x86.avx2.vperm2i128`. After modifying `right_shift_1` to use the new intrinsic, I got rustc to produce `llvm.x86.avx2.vperm2i128` followed by a `shufflevector`. However, the optimized LLVM IR from rustc still produces a single `shufflevector`, and it still ends up producing the bad asm.

I think this means that the fault is from some optimization pass in rustc that isn't in clang, but I haven't had time to investigate it yet...
Repository: rust
Issue: Inner function cannot be tested
Labels: T-compiler,C-feature-request,A-libtest

I really would like to be able to this:

``` rust
fn outer(x: i32) -> i32 {
    fn inner(a: i32, b: i32) -> i32 {
        a + b
    }
    #[test]
    fn test_inner() {
        assert_eq!(inner(3, 5), 8);
    }
    inner(x, 5)
}

#[test]
fn test_outer() {
    assert_eq!(outer(3), 8);
}
```
Repository: TypeScript
Issue: programUpToDate check in synchonizeHostData should ignore differences in library files that were injected by the compiler  
Labels: Bug

Currently `programUpToDate` compares the set of root files provided by the host with the set of files in the program. This check might fail even set of files in the program have not changed because set of files in program is composed of root files unioned with injected library files. As a result we'll spend time rebuilding the program when really nothing has been changed. 

The check should be updated to ignore differences that originate from injected files.
Repository: flutter
Issue: Callback for "key" presses on Input widget
Labels: c: new feature,customer: fuchsia,framework,a: desktop,P3,team-design,triaged-design

Internal: b/140828801

There are many use cases when it is desired to capture the actual key being pressed in a `input` widget.

A classic example is a "tag input" use case. You have a list of "tags/labels/chips" that is followed by a text input.  When you add some text in and submit it, a new tag/label/chip is added. When you press backspace/delete and the text input is empty, then the most recent tag/label/chip should be removed.

We will need a "onKeyPress" callback so that we can know if the backspace/delete key was being pressed.
Repository: nvm
Issue: support strict-ssl-false param?
Labels: installing node,feature requests,SSL issue,pull request wanted

I can't access the internet without the proxy in my company.
when I use `nvm` to install nodejs ,it always accesss the internet with https and causes the SSL certificate problem.
NPM is allow to set strict-ssl=false  in .npmrc to support it .
does NVM support this ?
Repository: vscode
Issue: Allow to specify the tsconfig.json filename explicitly 
Labels: feature-request,typescript,upstream-issue-linked

currently VSCode uses the file with the exact name `tsconfig.json` in the folder as the project file for a typescript project, 

i have a few other project files named differently for corresponding sub-projects **inside the same folder**, I wish there was a way to tell VSCode to use one of them rather then the default `tsconfig.json`
Repository: opencv
Issue: OpenCVConfig expects a certain layout on Windows
Labels: feature,category: build/install,affected: 3.4

##### System information (version)
- OpenCV => 74e997f15b20600895896e1a837a0bb3cbf7f07b
- Operating System / Platform => Windows
- Compiler => MSVC2013
##### Detailed description

The `OpenCVConfig.cmake` unconditionally does a lot of complicated logic on Windows. While the current setup has its use case, we would like to be able to install OpenCV just like any other library without a special runtime subdirectory (which requires extra `PATH` manipulations that we would like to avoid).
##### Steps to reproduce
- Set `OpenCV_INSTALL_BINARIES_PREFIX=` so that the install uses standard `bin/` and `lib/` directories;
- the installed `OpenCVConfig.cmake` cannot find anything because it is not told about the actual `OpenCV_INSTALL_BINARIES_PREFIX` used.

We set `OpenCV_INSTALL_BINARIES_PREFIX` to empty so that we do not want to extend `PATH` with the extra directories only used by OpenCV. Basically, we want a *nix-style install on Windows. This could probably be triggered based on whether the prefix is set manually or not. If it is set manually, assume the user knows what they are doing and skip the "find a runtime-compatible directory" logic and just install a regular `OpenCVConfig.cmake` to `lib/cmake/OpenCV/`.
Repository: angular
Issue: Add canDeactivateChild guard
Labels: feature,freq2: medium,area: router,feature: under consideration

**I'm submitting a ...**  (check one with "x")

```
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**What is the motivation / use case for changing the behavior?**
There is already a canActivateChild guard. Having the symmetric guard is equally important. Not sure why this wasn't added at the same time. We have many scenarios where we need to protect child routes from navigating away if they have pending unsaved changes. That's currently only possible by putting a canDeactivate guard on each child route. 
- **Angular version:** Latest
- **Browser:** all
- **Language:** all
Repository: bitcoin
Issue: whiteconnections should be re-added
Labels: P2P

The `whiteconnections` option was added in 0.12 but later removed in #6374 because it was viewed as being redundant. While whitelisted connections can no longer be _evicted_ as of that PR, `whiteconnections` is still useful because it allows for _new_ connections. For example, you could have a full node that you use as a gateway for several of your lightweight nodes, and in this case it may be impossible for you to connect to your gateway due to insufficient connection slots. whiteconnections solved this, but it is now removed.

Here's a real-world complaint about this issue: https://www.reddit.com/r/Bitcoin/comments/540hoj/can_whitelistnetmask_free_up_a_connection/

Perhaps it would be more elegant to detect when a whitelisted peer is trying to connect when we have no more connection slots, and trigger the eviction of a non-whitelisted inbound peer in this case. But it's probably easier to just re-add `whiteconnections`.
Repository: vscode
Issue: [icon-themes] Support for globs in file associations (Icon themes)
Labels: feature-request,themes

- VSCode Version: Stable 1.5.2
- OS Version: Windows 10

See [vscode-icons #328](https://github.com/robertohuertasm/vscode-icons/issues/328#issuecomment-248671728) 

This will allow to support a very common scenario which is a filename with small variations depending on environments:
- web.config, web.prod.config, web.dev.config
- webpack.config.json, webpack.dev.config.json
- ...
Repository: TypeScript
Issue: Adjust cursor position on new line or don't emit empty spaces
Labels: Bug,VS Code Tracked

From https://github.com/Microsoft/vscode/issues/11961
Ping @wallverb
- VSCode Version: Code - Insiders 1.6.0-insider (67a46126c83aac8c715d4c318fcfd18a183658bf, 2016-09-13T11:09:28.863Z)
- OS Version: Darwin x64 15.6.0

Steps to Reproduce:

TypeScript code 

``` ts
class Test {

    test() {

    }
}
```
1. Put cursor on line `2:0`
2. Hit enter

Initial:
![image](https://cloud.githubusercontent.com/assets/1723815/18477365/717dd642-799b-11e6-847b-0c1ca9a39288.png)

User presses Enter:

![image](https://cloud.githubusercontent.com/assets/1723815/18477384/7eb03a1c-799b-11e6-97a4-186930cd7571.png)

Notice how cursor is at `3:0` but there are spaces in front of cursor
Natural thing is to use tab to get to proper indent location which will leave empty spaces in front:

![image](https://cloud.githubusercontent.com/assets/1723815/18477416/9f91e5fa-799b-11e6-9b6b-297055261097.png)

(Users might not be aware there are extra whitespaces if they dont have `renderWhitespace`)

So seems like it should put cursor at the end of that whitespaces or not append whitespaces

FYI - Both Atom and Sublime - do not append whitespaces
Repository: angular
Issue: Huge performance impact on Component's host document click
Labels: type: bug/fix,area: performance,freq1: low,area: core,state: confirmed,core: host and host bindings,core: change detection,design complexity: major,P3

**I'm submitting a ...**  (check one with "x")

```
[x] bug report
[ ] feature request
[ ] support request
```

**Problem**
Performance impact when having few hundres instantiations of same component that registers on `document.click` event through `host` property in `@Component` directive.

``` ts
@Component({
  selector: 'value-edit',
  template: ``,
  host: {
    "(document: click)": "onClickOff($event)",
  }
)
export class ValueEditComponent {
  onClickOff(globalEvent) {
    // to make sure it doesn't affect performance we keep it EMPTY!
  }
}
```

**Behaviour**

Every single click wherever on the page (document) takes big amount of time, like 2-3 seconds in my case. The screenshot below shows a sequence of: wait ~5 seconds, click, wait few seconds and stop recording. The click is the huge green column on the screenshot:

![tnft3](https://cloud.githubusercontent.com/assets/31058/18782371/7871c27c-8186-11e6-8ef9-3c28fb7d1604.png)

**Expected behaviour**
Every single click shouldn't take seconds of processing.

**Reproduction of the problem**

[Plunker here](http://plnkr.co/edit/dWSXPihP8rePF08tiYvZ?p=preview)

Just commenting out `"(document: click)": "onClickOff($event)",` fixes the performance issue on click.

**Environment:**
- **Angular version:** 2.0.0
- **Browser:** latest stable Chrome 53.0.2785.116 m
- **Language:**  TypeScript 2.0.x

[posted StackOverflow question](http://stackoverflow.com/questions/39643062/huge-performance-impact-on-components-host-document-click-angular2)
Repository: angular
Issue: ngNonBindable can't handle unescaped { characters
Labels: freq2: medium,area: core,area: compiler,core: basic template syntax,type: use-case,P3,compiler: parser

**I'm submitting a ...**  (check one with "x")

```
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior** 
`<div>Test binding: {{2 + 2}}</div>`
  => `Test binding: 4`
`<div ngNonBindable>Test non binding: {{2 + 2}}</div>`
  => `Test binding: {{2 + 2}}`
`<div>Test  non binding: {2 + 2}</div>`
  => Template parse errors, the "(Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)" message.

This is a problem because precisely due to the fact that they are [ngNonBindable] marked elements, `"{{ '{' }}"` doesn't produce the expected result.

**Expected behavior**
As the escaping of `{` characters isn't possible inside [ngNonBindable] elements so it's the compiler's job to ignore them altogether, I believe. 

`<div>Test  non binding: {2 + 2}</div>`
  => `Test binding: {2 + 2}`

**Reproduction of the problem**
here => http://plnkr.co/edit/GSzwEUyXyY1qDabjpEL1?p=preview
- **Angular version:** 2.0.0
Repository: TypeScript
Issue: Allow method type guards
Labels: Suggestion,Awaiting More Feedback

**TypeScript Version:**  2.0.3

**Code**

Why I can have function type guard:

``` ts
function hasValue<T>(value: T | undefined): value is T { return value !== undefined; }
```

but not method type guard:

``` ts
export class Maybe<T> {
    constructor(public value: T | undefined) {}

    hasValue(): this.value is T { return this.value !== undefined; }
    //              ^ '{' or ';' expected.
}
```

?
Repository: rust
Issue: Channel should not default to `dev` when built from a tarball
Labels: P-medium,T-bootstrap,T-dev-tools,C-bug,E-needs-design

Today whenever Rust is built without a .git directory (approximately meaning "when it's built from a tarball") the configure script overrides the release channel to "stable", per [this PR](https://github.com/rust-lang/rust/pull/33971) and [this issue](https://github.com/rust-lang/rust/issues/28322). Unfortunately, as I [realized after a recent bug in which nightly distcheck thought it was a stable compiler](https://github.com/rust-lang/rust/pull/36678#issuecomment-249334587) this is not correct. Today, if somebody downloads a _nightly_ tarball and builds it, they will receive a compiler that claims to be a stable release. This is just not true.

I'm not sure how best to fix this. The configure script is the source of truth for the release channel, and the configure script is not telling the truth.

Here's one thing we could do: the build process that produces the tarball also dumps a `version` file into the source tree, and the release channel can be derived from that file. So when the [configure script sees that it is not in a git repo](https://github.com/rust-lang/rust/blob/master/configure#L652) it opens that file and looks for "-nightly", "-beta", or "-dev" and sets the release channel as appropriate. If it sees none of those it sets the channel to "stable". If the version file does not exist it sets the channel to "dev".

cc @alexcrichton
Repository: youtube-dl
Issue: add support for pixar.com
Labels: site-support-request

hi, 

could you please add support for pixar.com so i can view them without flash:

```
username@hostname:/tmp$ youtube-dl --verbose http://www.pixar.com/video/3790
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://www.pixar.com/video/3790']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.09.24
[debug] Python version 2.7.9 - Linux-4.2.0-0.bpo.1-amd64-x86_64-with-debian-8.5
[debug] exe versions: ffmpeg 2.8.6, ffprobe 2.8.6, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 3790: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 3790: Downloading webpage
[generic] 3790: Extracting information
[debug] Invoking downloader on u'http://www.pixar.com/video/3790'
[download] Destination: Pixar-3790.unknown_video
[download] 100% of 17.49KiB in 00:00
username@hostname:/tmp$ file Pixar-3790.unknown_video 
Pixar-3790.unknown_video: HTML document, ASCII text, with very long lines, with CRLF, LF line terminators
```

thanks
Repository: javascript
Issue: What rules do the community tend to override?
Labels: question

I'm opening this issue specifically to gather a list of the rules that those in the community feel are controversial or problematic, such that they override them, and most importantly, _why_.

This is not an invitation for "+1s" (those belong as reactions on individual posts), or an invitation to hear about everyone's subjective aesthetic preferences, nor is it an indication that any of these rules necessarily will - or will not - change. I'm simply hoping to primarily gather civil, well-reasoned explanations for why certain rules are overridden, disabled, etc.

Any comments mentioning spaces vs tabs, or semicolons, will be summarily deleted :-)

We're aware of the following:
- `react/jsx-filename-extension` - filed as #985. Why is it controversial? Some believe that `.js` files should be allowed to contain JSX. Others believe this is an app-level concern, and does not belong in a shared config (like "env" settings).
- ~~`import/no-extraneous-dependencies`: in test directories, for example, it needs to be overridden to the following (note: if/when eslint allows [glob-based config](https://github.com/eslint/eslint/issues/3611), then we'd set up some common test directory patterns so you wouldn't have to do this manually)~~ `eslint-config-airbnb` `v13.0.0` is now released, which resolves this.

``` js
  "import/no-extraneous-dependencies": ["error", {
    "devDependencies": true,
    "optionalDependencies": false,
  }],
```
- `camelcase`: when you're bound to the casing selected by APIs (https://github.com/airbnb/javascript/issues/1089#issuecomment-249396262, but Airbnb suffers from this too) This might also apply to `new-cap` and `no-underscore-dangle`.
- `no-param-reassign`: this happens frequently with a `reduce` where the entire operation is pure, but the reducer is not (ie, it mutates the accumulator, but the accumulator began as `{}` passed into the reducer). You can use `Object.assign({}, accumulator, changes)`, or `{ ...accumulator, ...changes }`, however. (per https://github.com/airbnb/javascript/issues/1089#issuecomment-249396262)
- `no-use-before-define`: some enjoy using hoisting to define helper methods at the bottom of the file. This guide discourages relying on hoisting; instead suggesting importing the helpers from another file when possible. (per https://github.com/airbnb/javascript/issues/1089#issuecomment-249396262)
- `no-mixed-operators` - specifically where it relates to arithmetic operators, where the PEMDAS rule applies. We're definitely considering loosening this rule as it applies to `*`, `/`, `+`, and `-`.

Any others? I'll update the original post with new examples as I'm made aware of them.

(Note: this does not cover env settings, like "browser", "node", "mocha", etc - these are app-level concerns, and as such, your `.eslintrc`, `tests/.eslintrc`, etc should be defining them)
Repository: go
Issue: x/pkgsite: Reset button for doc examples
Labels: Tools,pkgsite

example: https://golang.org/pkg/html/template/#example_Template_block

The only way to reset a code example when you mest up trying something is to refresh the page. This is annoying if you are on a large page. Note that ussualy you are just on this url https://golang.org/pkg/html/template without a hash tag to the example directly so your page wil jump up when you refresh.

Possible solutions update the hash tag when you expand the example

![image](https://cloud.githubusercontent.com/assets/863731/18813003/9c846b84-82e8-11e6-98f4-d1f96de2af2f.png)

Or introduce a reset icon somewhere. (where and how i am not sure yet, feel free to discuss)
Repository: flutter
Issue: Refresh indicator's arc takes a step back once finger is lifted
Labels: team,framework,f: material design,a: fidelity,has reproducible steps,P3,found in release: 3.10,found in release: 3.12,team-design,triaged-design

Open Gallery, go into "Over-scoll". Drag down to pull down the refresh indicator. Drag as far down as you can. Let go.

Expected: the head of the arrow remains in the same location after the circle moves up.

Actual: after the circle moves up, the head of the arrow moves back, seemingly "resetting" a few steps.

Visual effect can be seen here: https://youtu.be/GtoEuXJl2oQ Turn on 0.25 speed to really see the "step-back" once the circle moves back up once you let go.

Later in that video, you can see the refresh indicator for Gmail. Once the finger is lifted, and the circle moves up, the head of arrow stays in the same location. (Yes, the actual arrow point disappears, but the line itself remains in the same location.)
Repository: vscode
Issue: Extension proxy support
Labels: feature-request,api,proxy

Proxy support for Visual Studio Code has been introduced recently through environment variables/settings (see https://code.visualstudio.com/docs/setup/setup-overview#_proxy-server-support). As an extension developer I would like to use these settings when requesting resources from the internet. My current implementation fails for users using a proxy.

What is the recommended way for an extension to use a proxy?

I could not find a `vscode` API that exposes methods to make requests using a proxy other than access to the proxy settings (`workspace.getConfiguration()`) and implementing everything on my own. Looking at the Visual Studio Code code base I identified the code that adds support for proxies, but copy&paste it into my extension would result in duplicated and potentially outdated code, which is something I want to avoid whenever possible. As I am probably not the only extension developer accessing the internet, I would like to hear your opinion on this issue. Any feedback would be greatly appreciated.
Repository: flutter
Issue: Draggable feedback in overlay should optionally be same size as child. ("use child as feedback" feature)
Labels: c: new feature,framework,customer: solaris,P3,team-framework,triaged-framework
Repository: go
Issue: fmt: Scan returns "unexpected EOF" instead of io.EOF when arguments have a custom Scan method
Labels: NeedsDecision

### What version of Go are you using (`go version`)?

```
go version go1.7.1 linux/amd64
```
### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/kai/work/go"
GORACE=""
GOROOT="/home/kai/opt/go"
GOTOOLDIR="/home/kai/opt/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build253151644=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
```
### What did you do?

https://play.golang.org/p/L6XtKIJIFb
### What did you expect to see?

```
1 <nil> 42
1 <nil> 42
0 EOF 0
0 EOF 0
```
### What did you see instead?

```
1 <nil> 42
1 <nil> 42
0 EOF 0
0 unexpected EOF 0
```
Repository: TypeScript
Issue: Line break in module declaration causes compile time error
Labels: Bug,Help Wanted

<!-- BUGS: Please use this template. -->

<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->

<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

**TypeScript Version:**  2.0.3

A line break in the declaration of a module causes a compile time error.
This could either be that the language specification isn't clear that this is illegal or a bug.

**Code**

``` ts
// Example declaration with line break
declare module 
     my.very.long.name.foo.bar.baz.able.baker {}

```

**Expected behavior:**
I don't see anything in the language specification that would make this a compile time error, so I would expect the statement to work as if declaration was all on one line, ie:

``` ts
// Example declaration with line break
declare module my.very.long.name.foo.bar.baz.able.baker {}

```

**Actual behavior:** 

A compile time error, in particular: (1, 9): error TS1005: ';' expected.