sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: Idea: events for new/closed RPC channels
Labels: enhancement,api

From gitter:

```
osa1 >  my plugin is attached to a running nvim instance using unix socket address,
 but how do I get rpc channel created by neovim for my plugin? is there a way to 
do that without creating variables etc. in plugin side?

splinterofchaos > @osa1 Every socket connection forms a unique channel. 
As an alternative, can you start your plugin via rpcstart()?

osa1 > @splinterofchaos I'm using rpcstart() but it's harder to debug that way. 
(can't read stdout, have to write logs) I know every socket forms a unique channel, 
it'd be nice if nvim at least showed a notification like "new rpc client connected at 
channel N" etc.

splinterofchaos > Ok, how does an autocmd like RpcChannelOpenned/Closed sound? 
Then, you could:
    autocmd RpcChannelOpenned * echomsg 'new rpc client @' . expand("<amatch>")

osa1 > wow, that sounds like a great idea and yeah that would definitely work for me
```

I think a autocmds for RPC channels could be generally useful for bookkeeping and debugging for plugin writers, although there may in fact be a simpler solution to @osa1's problem.
Repository: java-design-patterns
Issue: Add virtual field pattern
Labels: info: help wanted,epic: pattern,type: feature

There's a new (I think) pattern called the Virtual field pattern, introduced in Java 8. https://kerflyn.wordpress.com/2012/07/09/java-8-now-you-have-mixins/ Scroll half way through till you find "Another Approach".
Repository: rust
Issue: Benchmarks are run when just executing tests, leading to very slooooow tests
Labels: I-slow,C-enhancement,C-feature-request,A-libtest,requires-nightly

In my benchmarks, I generate some non-trivial sized blobs of data. Recently, my regular test runs have been very slow, and I believe it's because the benchmarks are running even when not passing `--bench`

**bench.rs**

``` rust
#![feature(test)]

extern crate test;
use std::iter;

#[bench]
fn slow(b: &mut test::Bencher) {
    // This is dog-slow without optimizations...
    let s: String = iter::repeat("a").take(5*1024*1024).collect();
    println!("I made a string");
    b.iter(|| 1 + 1);
    b.bytes = s.len() as u64;
}
```

And running it:

```
$ rustc --test bench.rs
$ ./bench --nocapture

running 1 test
I made a string
test slow ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
```

Even running with `--test` still runs these very slow tests.
Repository: rust
Issue: non-hygienic lifetime-shadowing check can make macros non-modular
Labels: A-lifetimes,A-macros,T-compiler,C-bug,A-hygiene

non-hygienic lifetime-shadowing check can make macros non-modular

This is sort of related to #24278

Here is some example code ([playpen](http://is.gd/qktKxW))

``` rust
macro_rules! foo {
    ($m:ident) => {
        fn $m<'a>(x: &'a i8) -> i8 { *x }
    }
}

struct Foo<'a>(&'a i8);

impl<'a> Foo<'a> {
    foo!(bar);
    fn baz() -> i8 {
        let x = 3_i8;
        Foo::bar(&x)
    }
}

fn main() {
    println!("{}", Foo::baz());
}
```

This yields the error:

```
<anon>:3:15: 3:17 error: lifetime name `'a` shadows a lifetime name that is already in scope
<anon>:3         fn $m<'a>(x: &'a i8) -> i8 { *x }
```

The problem is that there is no way for the macro author to make their macro robust against all possible contexts here.  In other words, the referential transparency component of hygiene demands that the lifetimes introduced by an expansion be treated as fresh, but they are not.

(Of course, there are plenty of other ways that our macro system is not hygienic, so this is likely to be filed away as a known weakness in `macro_rules!`.  I just wanted to have a place to reference this problem.)
Repository: TypeScript
Issue: Feature Request: F# style Type Provider support?
Labels: Suggestion,Needs Proposal

Could we get support for something like F#'s type providers in the future?

Let me present some use case scenarios for this.. Let's suppose you have a TS project trying to access a REST API, and this REST API uses Swagger or RAML for documentation. Well in this case we could have something like this;

```
var fooClient = new SwaggerClient<"http://foo.com/swagger.json">();
fooClient.getPeople((people) => {
    people.every((person) => console.log(person.firstName + "," + person.lastName);
});
```

and this could be completely type safe, as the SwaggerClient pulls down the API return types, method names (such as getPeople) and signatures at compile time and exposes them as methods to the type system. I think that's pretty huge. Such clients could be written by the community for RAML, SOAP or what have you.

another nice one:

```
var doc = new Document<"index.html">()
doc.titleSpan.text = "Hello World!";
doc.myButton.addListener("clicked", () => { console.log("tapped!")});
```

In this example the Document type provider loads our index.html file and finds all the elements with id's and figures out what types they are, and exposes them in the type system at compile time. Again, I think that's pretty huge!

F# uses Type Providers for all kinds of things, so there's lots of ways this can get used. It's easy to see frameworks figuring out all kinds of amazing things that these could be used for. It also feels like a nice fit for TypeScript because it helps bridge the benefits on dynamic typing with the benefits of static typing.

one more tiny example:

```
console.log(StringC<"name:%s/tid:%n">("Battlebottle", 128));
```

a simple string formatter. This reads "name:%s/tid:%n" and knows that %s and %n must be replaced with a string and number respectively, so at compile time it produces a method that accepts a string parameter and a number parameter. Basically a statically typed string formatter. Just a tiny of example of handy little utilities that could be written with this feature. But the opportunity is pretty huge I think in general.

Any thoughts?
Repository: angular
Issue: Can't retrieve attributes of the top-level component
Labels: area: core,core: di,type: confusing,P4

 http://plnkr.co/edit/5731Z9N6tQ391gQtfZrA?p=preview

I've been over the documentation 10 times, I've read through the source code, tutorials, the works...  and I still can't wrap my head around what I'm doing wrong.

all I want to do is:

``` html
<app myTitle='my awesome title'>  
```

and access myTitle from inside the constructor.

Is that possible in NG2?
Repository: go
Issue: cmd/link: merge dynlib handling for PE/Macho/ELF
Labels: compiler/runtime

The code that ensures that the binaries we create are linked against the right shared libraries is scattered all of the place and handled in inconsistent ways for all the binary formats.  Clean this up.

(For Go 1.6, if that wasn't obvious)
Repository: youtube-dl
Issue: --get-filename not getting the final filename (was: get filename not working?)
Labels: bug

"--get-filename" returns a different name from a normal execution.

~# youtube-dl -o 'test.%(ext)s' --prefer-ffmpeg --get-filename https://www.youtube.com/watch?v=f3gNU0rNIIo
test.webm

:~# youtube-dl -o 'test.%(ext)s' --prefer-ffmpeg  https://www.youtube.com/watch?v=f3gNU0rNIIo
[youtube] f3gNU0rNIIo: Downloading webpage
[youtube] f3gNU0rNIIo: Extracting video information
[youtube] f3gNU0rNIIo: Downloading DASH manifest
WARNING: You have requested formats incompatible for merge. The formats will be merged into mkv
[download] Destination: test.f248.webm
[download] 100% of 83.44MiB in 00:02
[download] Destination: test.f141.m4a
[download] 100% of 7.24MiB in 00:00
[ffmpeg] Merging formats into "test.mkv"
Deleting original file test.f248.webm (pass -k to keep)
Deleting original file test.f141.m4a (pass -k to keep)
~# ls
test.mkv

I am expecting the two commands to return the same filename (either .mkv or .webm).

What am I doing wrong?
Thanks
Repository: go
Issue: cmd/asm: Allow data references to labels in assembly (support for jump tables)
Labels: compiler/runtime

I've noticed a couple comments in Go assembly routines "TODO replace this with a jump table in the future" and when I tried implementing an assembly routine with a jump table I realized why it hasn't been tried yet. The assembler does not support using labels in data, so there's no easy way to construct the jump table. My incomplete understanding of x64 architecture is that jumps are signed 32 bit offsets from the instruction pointer, which seems like it would make it difficult to implement. Maybe there's also a way to do a jump to a 64bit virtual address, I don't know.

Anyway if it's not too difficult, this would be a nice to have.
Repository: youtube-dl
Issue: Display JSON for videos with only some regions allowed
Labels: request

ex.: 
./youtube-dl -j https://www.youtube.com/watch?v=JTIBV-86Pt0
ERROR: JTIBV-86Pt0: YouTube said: The uploader has not made this video available in your country.

When you look at the page source metas:
`<meta itemprop="regionsAllowed" content="AR,BO,CL,CO,DO,EC,PE,PR,PY,US,UY,VE">`

It would be great if instead of ERROR, the json output would give the array of allowed countries so you can use a proper proxy for a second try.
Repository: youtube-dl
Issue: add support for Sotheby's
Labels: site-support-request

Example URL:
http://www.sothebys.com/content/sothebys/en/news-video/videos/2015/05/seven-artist-records-in-sothebys-contemporary-art-evening-auction.html

~ $ 
youtube-dl --verbose "http://www.sothebys.com/content/sothebys/en/news-video/videos/2015/05/seven-artist-records-in-sothebys-contemporary-art-evening-auction.html"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://www.sothebys.com/content/sothebys/en/news-video/videos/2015/05/seven-artist-records-in-sothebys-contemporary-art-evening-auction.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.10
[debug] Python version 2.7.8 - Linux-3.16.0-37-generic-x86_64-with-Ubuntu-14.10-utopic
[debug] exe versions: avconv 11-6, avprobe 11-6
[debug] Proxy map: {}
[generic] seven-artist-records-in-sothebys-contemporary-art-evening-auction: Requesting header
WARNING: Falling back on generic information extractor.
[generic] seven-artist-records-in-sothebys-contemporary-art-evening-auction: Downloading webpage
[generic] seven-artist-records-in-sothebys-contemporary-art-evening-auction: Extracting information
ERROR: Unsupported URL: http://www.sothebys.com/content/sothebys/en/news-video/videos/2015/05/seven-artist-records-in-sothebys-contemporary-art-evening-auction.html
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 937, in _real_extract
    doc = parse_xml(webpage)
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1558, in parse_xml
    tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 73, column 6986
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 650, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 273, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1467, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: http://www.sothebys.com/content/sothebys/en/news-video/videos/2015/05/seven-artist-records-in-sothebys-contemporary-art-evening-auction.html
Repository: neovim
Issue: foreground() function definition is empty
Labels: enhancement,gui

The definition of the `foreground()` function is empty (eval.c):

``` c
static void f_foreground(typval_T *argvars, typval_T *rettv)
{
}
```

Although the function is not useful for the default UI on Unix because it is not linked to X11 libraries and, thus, cannot raise the terminal window, it is useful for graphical user interfaces, like [neovim-qt](https://github.com/equalsraf/neovim-qt). Perhaps, the function should send a message to the UI which then would decide what to do.

I think that the default UI on Unix should do nothing. Another option is to work with a provider, like it is done with the clipboard. For example, `wmctrl` could be the provider for `foreground()` because on Linux we can raise a terminal emulator window with the command:

```
wmctrl -ia $WINDOWID
```
Repository: youtube-dl
Issue: Add support for mako.co.il
Labels: site-support-request

link to test: http://www.mako.co.il/mako-vod#/mako-vod-keshet/eretz_nehederet-s12/VOD-3ad468a2e9e3d41006.htm?sCh=de317051b0cfa410&pId=957463908
Repository: go
Issue: x/tools/cmd/gomvpkg: fails on build problems elsewhere in the GOPATH
Labels: Tools

Was calling

  gomvpkg -from github.com/jmhodges/foobar/baz -to github.com/jmhodges/foobar/quux

and gomvpkg errored out with

```
While scanning Go workspace:
Package "github.com/jmhodges/serve": /Users/jmhodges/src/github.com/jmhodges/serve/serve.go:1:1: expected 'package', found 'IDENT' ypackage.
Package "github.com/dominikh/go-mode.el/indentation_tests": found packages dangling_operator.go (main) and gh-10.go (gh10) in /Users/jmhodges/src/github.com/dominikh/go-mode.el/indentation_tests.
gomvpkg: failed to construct import graph.
```

These packages are unrelated and it would be nice for gomvpkg to be able to build errors in unrelated areas. This might have to be an additional feature of buildutil.
Repository: youtube-dl
Issue: [youtube] Set Like to videos, which are downloaded.
Labels: request

I suppose people would download videos which they're liked. 
So it is easy to send one more request right after video was downloaded to mark it as liked automatically?

Of course add an option key to enable/disable that feature. =]

Thanks a lot for your work.
Repository: rust
Issue: Default impls are not restricted to same module (or submodule) as the trait
Labels: A-type-system,T-compiler,C-bug,T-types

In the [OIBIT RFC](https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md) there are two limitations for default impls:

> 1. The default impl must appear in the same module as `Trait` (or a submodule).
> 2. `Trait` must not define any methods.

Limitation (1) does not appear to match the current implementation. The only error I can find pertaining to this rule is E0318, whose message is:

> cannot create default implementations for traits outside the crate they're defined in; define a new trait instead

Also, the following example currently compiles:

``` rust
#![feature(optin_builtin_traits)]

mod foo {
    pub trait Foo { }
}

mod bar {
    impl super::foo::Foo for .. { }
}

fn main() {}
```

I'm not sure if this is a bug in the implementation, if it's merely unimplemented, or if the RFC should be updated to reflect that you can define a default impl in the same crate, with no restriction on which module it's defined in.
Repository: youtube-dl
Issue: [site-support-request] music.naver.com
Labels: site-support-request

http://music.naver.com/artist/videoPlayer.nhn?videoId=99476

Support this site, please~
Thanks in advance. :)
Repository: react
Issue: Change event fires extra times before IME composition ends
Labels: Type: Bug,Component: DOM

### Extra details

* Similar discussion with extra details and reproducing analysis: https://github.com/facebook/react/issues/8683
* Previous attempt to fix it: https://github.com/facebook/react/pull/8438 (includes some unit tests, but sufficient to be confident in the fix)

------

### Original Issue


When I was trying this [example](https://jsfiddle.net/reactjs/n47gckhr/light/) from https://facebook.github.io/react/blog/2013/11/05/thinking-in-react.html, any Chinese characters inputted by Chinese pinyin input method would fire too many renders like:

![screen shot 2015-05-21 at 14 04 36](https://cloud.githubusercontent.com/assets/1091472/7742565/2c8625b0-ffc3-11e4-8ac2-d7eb22a3aef3.png)

Actually I would expect those not to fire before I confirm the Chinese character.

Then I tried another kind of input method - wubi input method, I got this:

![screen shot 2015-05-21 at 14 17 15](https://cloud.githubusercontent.com/assets/1091472/7742657/42c27bac-ffc4-11e4-8a3a-7d4550e88a59.png)

It's weird too. So I did a test [in jQuery](http://jsbin.com/yepogahobo/1/edit?html,js,console,output):

![screen shot 2015-05-21 at 14 05 12](https://cloud.githubusercontent.com/assets/1091472/7742591/71da6842-ffc3-11e4-9d7a-a8438721029c.png)

Only after I press the space bar to confirm the character, the `keyup` event would fire.

I know it might be different between the implementation of jQuery `keyup` and react `onChange` , but I would expect the way how jQuery `keyup` handles Chinese characters instead of react's `onChange`.
Repository: go
Issue: testing: autodetect appropriate benchtime
Labels: NeedsInvestigation

For discussion:

There is tension in how long to run benchmarks for. You want to run long, in order to make any overhead irrelevant and to reduce run-to-run variance. You want to run short, so that it takes less time; if you have a fixed amount of computing time, it'd be better to run multiple short tests, so you can do better analysis than taking the mean, perhaps by using [benchstat](rsc.io/benchstat).

Right now we use a fixed duration, which is ok, but we could do better. For example, many of the microbenchmarks in strconv appear stable at 10ms, which is 100x faster than the default of 1s.

Rough idea, input welcomed:

The time to run a benchmark is V+C*b.N, where b.N is the number of iterations and V and C are random variables -- V for overhead, C for code execution time. We can take measurements using different b.N (starting small and growing) and estimate V and N. Based on that, we can calculate what b.N value is required to reduce the contribution of V to the sum to some fixed limit, say 1%.

This should allow stable, fast benchmarks to execute very quickly. Slower benchmarks would get slower (you have to execute with b.N=1 and 2 at a bare minimum), but that's better than accidentally misleading the user into thinking that they have a meaningful performance number, which is what can currently happen.

We would probably want to change benchtime to be a cap on running time and increase the default value substantially. If stable numbers are not achievable within the provided benchtime, we would warn the user, who could increase the benchtime or change the benchmark.

I put together a quick-and-dirty version of this using linear regression to estimate V and C. It almost immediately caught a badly behaved benchmark (fixed in [CL 10053](https://go.dev/cl/10053)), when it estimated that the benchmark would take hours to run in order to be reliable. I haven't run it outside the `encoding/json` package; I imagine that there are other benchmarks that need fixing.

Again, input welcomed. I'm not a statistician; I don't even play one on TV.
Repository: go
Issue: cmd/compile: some large-temp-heap-allocations need to be moved before escape analysis
Labels: compiler/runtime

This follows https://golang.org/cl/10268/ and includes more convoluted (harder to trigger, harder to fix) versions of the problems addressed there.  "The problem" is that any time a stack allocation of pointer-containing data is converted to a heap allocation (this happens if the stack allocation is very large), the pointers stored in that data must be noted as escaping to heap.  This works fine if the stack-to-heap conversion takes place before escape analysis, but not-fine if it occurs after escape analysis.  In most cases conversion occurs during typechecking (before escape analysis) but in some cases walk (after escape analysis) performs transformations that are then type-checked.  From josharian's comments on the CL above:

---

Here are some large (but not arbitrarily large) temps introduced during walk. Don't know whether they are of concern.  
Up to 1024 bytes in convT2E (walk.go:1064)  
Up to 2048 bytes in OMAKEMAP (walk.go:1441)  
Up to 128 bytes in OSTRARRAYRUNE (walk.go:1559)  
Here are what look to me like arbitrarily large temps introduced during walk, although I might be wrong:

In ascompatet in walk.go:1758. See also the todo at order.go:30. Code to reproduce:  

```
package p
func g() ([10000]byte, error) {
    switch { // prevent inlining
    }
    var x [10000]byte
    return x, nil
}
func f() {
    var e interface{}
    var err error
    e, err = g()
    _, _ = e, err
}
```

Note that f uses 20048 bytes of stack.  
reorder3save, at walk.go:2461. Code to reproduce:

```
package p
func g() [10000]byte {
    switch {
    } // prevent inlining
    var x [10000]byte
    return x
}
func f() {
    var m map[[10000]byte]bool
    m[g()] = true
}
```

Note that f uses 20016 bytes of stack.
Repository: kubernetes
Issue: Generalize container image representation
Labels: priority/backlog,sig/node,sig/api-machinery,kind/feature,lifecycle/frozen

Forked from #7018 and #7203.

We need to generalize the representation of container images so that we can support more image formats, pinning to specific image hashes, references to image API objects, and other features in the future. Generalizing this representation breaks ALL API versions, so we should do that now.

The proposed format is here: https://github.com/GoogleCloudPlatform/kubernetes/issues/7203#issuecomment-104463241

It follows the approach of VolumeSource.

```
    ContainerImage json:",inline"
...
type ContainerImage struct {
    DockerImage *DockerImage
}
type DockerImage struct {
    Name string // "repository" in v1 registry speak
    Tag string
}
```

@bakins @philips @smarterclayton @yifan-gu
Repository: youtube-dl
Issue: Display whether YouTube video has encrypted signature in JSON dump (--get-json)
Labels: request

As talked about in https://github.com/rg3/youtube-dl/issues/5787 and https://github.com/rg3/youtube-dl/issues/5781 it would be very useful to display whether the original YouTube signature was encrypted or not in the JSON dump (`--get-json`/`-j`)

Something as simple as `"encryptedSignature": 1` added to the JSON dump would do the trick.
Would this be difficult to add?
Repository: youtube-dl
Issue: site support request: pinkbike.com
Labels: site-support-request

```
$ youtube-dl --version
2015.05.15
```

```
$ youtube-dl -v http://www.pinkbike.com/video/408888/
[debug] System config: []
[debug] User config: ['--console-title']
[debug] Command-line args: ['-v', 'http://www.pinkbike.com/video/408888/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.15
[debug] Python version 3.4.3 - Linux-4.0.4-2-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 2.6.3, ffprobe 2.6.3, rtmpdump 2.4
[debug] Proxy map: {}
[generic] 408888: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 408888: Downloading webpage
[generic] 408888: Extracting information
ERROR: Unsupported URL: http://www.pinkbike.com/video/408888/
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 649, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 273, in extract
    return self._real_extract(url)
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/generic.py", line 1467, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.pinkbike.com/video/408888/
```