sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: youtube-dl
Issue: Option to combine -o and -g
Labels: request

- [X] I've **verified** and **I assure** that I'm running youtube-dl **2016.04.13**
- [X] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [X] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [ ] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [X] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---
### Description of your _issue_, suggested solution and other information

I use Kodi Media Center for all my entertainment and media management. This program is capable of playing streaming video in many formats from an url written in a .strm file. I would like to use youtube-dl to output a playlist of music videos in a specific format (say, `'%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s'` which will put playlist files into a common folder, but instead of actually downloading the video, just echo the url (as given by the `-g` option) into the file. I have actually accomplished this using a bash script which parses the output of `youtube-dl --get-filename --get-url` but it is a very hacky solution. Any chance this could become a feature?

EDIT: To give an example, I would like to be able to run `youtube-dl -f best -g -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLY5f8vtstsfjedMi6VHRAeFV85Xc_VoKG` and see afterwards a subdirectory in the working dir of youtube-dl, which is named by the title of the playlist (in this case, NateWantsToBattle Songs) and in that subfolder would be a number of files named according to their order in the playlist and title (in this case, one would be named "NateWantsToBattle Songs/01 - twenty one pilots - Stressed Out [NateWantsToBattle feat. ShueTube].mp4") and each file would contain only the plain-text url of the video as shown by -g (the example above would contain the url string shown [here](http://pastebin.com/raw/60uTA3Nb)).
Repository: go
Issue: encoding/asn1:  better error message when unmarshaling non-pointer
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!
1. What version of Go are you using (`go version`)?
   NaCL / Playground
2. What operating system and processor architecture are you using (`go env`)?
   Playground
3. What did you do?
   https://play.golang.org/p/TnLoso9len
4. What did you expect to see?

```
1.2.840.113549.1.9.16.1.4
[6 11 42 134 72 134 247 13 1 9 16 1 4]
1.2.840.113549.1.9.16.1.4
```
1. What did you see instead?

```
1.2.840.113549.1.9.16.1.4
[6 11 42 134 72 134 247 13 1 9 16 1 4]
panic: reflect: call of reflect.Value.Elem on slice Value

goroutine 1 [running]:
panic(0x184720, 0x10434260)
    /usr/local/go/src/runtime/panic.go:464 +0x700
reflect.Value.Elem(0x188f40, 0x10434250, 0x97, 0x10434250, 0x0, 0x0, 0x0, 0x188f40)
    /usr/local/go/src/reflect/value.go:735 +0x2a0
encoding/asn1.UnmarshalWithParams(0x10444074, 0xd, 0x40, 0x188f40, 0x10434250, 0x0, 0x0, 0x10434220, 0x0, 0x0, ...)
    /usr/local/go/src/encoding/asn1/asn1.go:989 +0xc0
encoding/asn1.Unmarshal(0x10444074, 0xd, 0x40, 0x188f40, 0x10434250, 0x10434250, 0x0, 0x0, 0x0, 0x0, ...)
    /usr/local/go/src/encoding/asn1/asn1.go:983 +0x80
main.main()
    /tmp/sandbox412831617/main.go:24 +0x480
```
Repository: go
Issue: cmd/link: move away from *LSym linked lists
Labels: compiler/runtime

The linked lists come from the original C code. Slices make the code a bit easier to follow.
Repository: go
Issue: cmd/compile: eliminate all (some?) convT2{I,E} calls
Labels: Performance,NeedsFix,early-in-cycle

For pointer-shaped types, convT2{I,E} are already done by the compiler.  We currently call into the runtime only for non-pointer-shaped types.
There are two cases, where the interface escapes and where it doesn't.

```
type T struct {
    a, b, c int
}
func f(t T) interface{} {
    return t
}
func g(t T) {
    h(t)
}
//go:noescape
func h(interface{})
```

In both cases, I think, it would be easier to inline the work that convT2{I,E} does.  f does this:

```
LEAQ    type."".T(SB), AX
MOVQ    AX, (SP)
LEAQ    "".autotmp_0+40(SP), AX
MOVQ    AX, 8(SP)
MOVQ    $0, 16(SP)
CALL    runtime.convT2E(SB)
MOVQ    24(SP), CX
MOVQ    32(SP), DX
```

instead it could do:

```
LEAQ    type."".T(SB), AX
MOVQ    AX, (SP)
CALL    runtime.newobject(SB)
MOVQ    8(SP), DX
MOVQ    "".autotmp_0+40(SP), AX
MOVQ    "".autotmp_0+48(SP), BX
MOVQ    "".autotmp_0+56(SP), CX
MOVQ    AX, (DX)
MOVQ    BX, 8(DX)
MOVQ    CX, 16(DX)
LEAQ    type."".T(SB), CX
```

11 instructions instead of 8, but several runtime calls bypassed (convT2E, plus the typedmemmove it calls, and everything that calls, ...).
The expanded code gets larger if T has a pointer in it.  Maybe we use typedmemmove instead of explicit copy instructions in that case.

`g` is even easier because there is no runtime call required at all.  Old code:

```
LEAQ    type."".T(SB), AX
MOVQ    AX, (SP)
LEAQ    "".autotmp_2+64(SP), AX
MOVQ    AX, 8(SP)
LEAQ    "".autotmp_3+40(SP), AX
MOVQ    AX, 16(SP)
CALL    runtime.convT2E(SB)
MOVQ    24(SP), CX
MOVQ    32(SP), DX
```

new code:

```
MOVQ    "".autotmp_2+64(SP), AX
MOVQ    "".autotmp_2+72(SP), BX
MOVQ    "".autotmp_2+80(SP), CX
MOVQ    AX, "".autotmp_3+40(SP)
MOVQ    BX, "".autotmp_3+48(SP)
MOVQ    CX, "".autotmp_3+56(SP)
LEAQ    type."".T(SB), CX
LEAQ    "".autotmp_3+40(SP), DX
```

one less instruction, and if we can avoid the copy (if autotmp_2 is never modified after), it could be even better.  And no write barriers are required on the copy even if T has pointers.

Maybe we do the no-escape optimization first.  It seems like an obvious win.  That would allow removing the third arg to convT2{I,E}.  Then we could think about the escape optimization.

@walken-google
Repository: opencv
Issue: Delaunay Triangulation, possible wrong calculation for huge graphs?
Labels: bug,category: imgproc,affected: 3.4

Hi there,

I was working with delaunay triangulation using OpenCV and trying to create a Gabriel Graph (https://en.wikipedia.org/wiki/Gabriel_graph) from delaunay. But the result is not like what I expected. Also, I compared results with R library (spdep). 

thanks
### Please state the information for your system
- OpenCV version: 3.1.0
- Host OS: Windows 10
### In which part of the OpenCV library you got the issue?
- imgproc
### Expected behaviour

Whole complete graph.
### Actual behaviour

In the Gabriel graph, some nodes are not connected to the main graph (staying alone), this should not be. I draw also delaunay graph, in some parts most probably it's calculating the angles wrongly and connecting nodes which should not be also.
### Additional description

There are 3 pictures and the data (delaunay, gabriel (alone nodes are different colors) and r library's gabriel result). I used the 2d points for testing from (cluto-t8.8k, https://github.com/deric/clustering-benchmark/tree/master/src/main/resources/datasets/artificial)

[result.txt](https://github.com/Itseez/opencv/files/226689/result.txt)

delaunay:
![delaunay](https://cloud.githubusercontent.com/assets/12943145/14652931/d173ed74-0633-11e6-9f18-6cb1edd2369c.png)

gabriel:
![gabriel](https://cloud.githubusercontent.com/assets/12943145/14652935/d36c3690-0633-11e6-970c-5515cff5f7c8.png)

r library's gabriel
![rplot02](https://cloud.githubusercontent.com/assets/12943145/14652948/de4da9ea-0633-11e6-88d2-5eedcdd34271.png)
Repository: TypeScript
Issue: Suggestion: Better error message when unable to resolve modules
Labels: Docs

Related to our woes with #8189, if the compilation errors gave some better hinting when it was unable to resolve a module, we might not have taken so long to find the solution (and we wouldn't have filed an issue!).

The idea would be that if there is a compilation error of `cannot file module "whatever"`, to make some intelligent checks against the parameters the compilation is running under and suggest using `--moduleResolution node` if the user is not already doing so.
Repository: flutter
Issue: expose the navigator route as a service extension
Labels: c: new feature,tool,framework,f: routes,P3,team-framework,triaged-framework

Something like:
- [ ] get the current value for the route
- [ ] set a new value for the route
- [ ] enable and disable receiving events on route changes

@Hixie, I very briefly looked at the flutter sources, but didn't see how to get this info.
Repository: TypeScript
Issue: Preselect completion list entries based on contextual type
Labels: Suggestion,Help Wanted,API

It should be cool if tsserver could provide a new command `guesstypes` to give the capability to guess parameter types when completion is applied

In other word, I would like to support the [same feature that I have done with tern ](https://github.com/angelozerr/tern-guess-types)

For instance if you open completion for `document` and select `addEventListener` : 

![Tern completion](https://github.com/angelozerr/tern-guess-types/wiki/images/TernCompletion.png)

When you apply completion, I would like call a tsserver command 'guesstypes' to retrieve variables, functions for each function parameters. Here a screenshot which shows a list of variable with string type for the `addEventListener` type argument : 

![Tern completion](https://github.com/angelozerr/tern-guess-types/wiki/images/TernGuessTypes.png)
Repository: go
Issue: os: Stdin is broken in some cases on windows
Labels: OS-Windows

Please answer these questions before submitting your issue. Thanks!
1. What version of Go are you using (`go version`)?
   go version go1.6 windows/amd64
2. What operating system and processor architecture are you using (`go env`)?
   set GOARCH=amd64
   set GOOS=windows
3. What did you do?
   I tried to make a Squid (a proxy server) auth helper with Go. It's a simple program that needs to read it's stdin, parse it and send the response to stdout. See http://wiki.squid-cache.org/Features/AddonHelpers for details.
   Here is the link to my code: https://play.golang.org/p/NR9PkX0fu7
4. What did you expect to see?
   My squid instance need to ask credentials upon http request. No error messages related to my program need to be in squid log.
5. What did you see instead?
   Every thing went fine. I tested the program from console, I tested it with echo, sending login and pass by pipe, like 'echo vasya 1 | sqauth'. No errors detected. Then, I configured Squid to run the program as an auth helper. Squid didn't start. In log file I saw this record: 'read /dev/stdin: The parameter is incorrect.', thre record from line 26 of my code. I spent few hours investigating the problem, and that's what I got. It seems that Squid starts its child processes, and sets its stdin to async socket handlers. It's not pretty good documented in WINAPI doc, but when they run ReadFile on async IO handler with NULL lpOverlapped parameter (it's the last parameter to function), the error 87 happens (The parameter is incorrect). I looked go source code, and I saw that 'File.read' function calls syscall.ReadFile with lpOverlapped == nil in any case.

Thus that the case, when I start go program as children process with stdin as async socket, os.Stdin is always broken and I have no normal way to get data from stdin. Instead I need to use platform dependend syscall. It would be pretty good to use standard os.Stdin in any case. It's interesting that C fgets works fine with normal stdin in the case.

The working C programm: [fake.cc.zip](https://github.com/golang/go/files/228057/fake.cc.zip).
Repository: youtube-dl
Issue: Command line credentials are applied for all the extractors in extraction process
Labels: bug

---
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.04.19**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

```
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'http://vk.com/video356065542_456239041', u'-p', u'PRIVATE', u'-u', u'PRIVATE', u'-v']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2016.04.19
[debug] Git HEAD: 494ab6d
[debug] Python version 2.6.6 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg 3.0, ffprobe N-77883-gd7c75a5, rtmpdump 2.4
[debug] Proxy map: {}
[vk] Downloading login page
[vk] Logging in as <snip>
[vk] 356065542_456239041: Downloading webpage
[youtube] Downloading login page
[youtube] Logging in
ERROR: Unable to login: The email and password you entered don't match.
Traceback (most recent call last):
  File "C:\Dev\git\youtube-dl\master\youtube_dl\YoutubeDL.py", line 671, in extract_info
    ie_result = ie.extract(url)
  File "C:\Dev\git\youtube-dl\master\youtube_dl\extractor\common.py", line 340, in extract
    self.initialize()
  File "C:\Dev\git\youtube-dl\master\youtube_dl\extractor\common.py", line 334, in initialize
    self._real_initialize()
  File "C:\Dev\git\youtube-dl\master\youtube_dl\extractor\youtube.py", line 187, in _real_initialize
    if not self._login():
  File "C:\Dev\git\youtube-dl\master\youtube_dl\extractor\youtube.py", line 132, in _login
    raise ExtractorError('Unable to login: %s' % error_msg, expected=True)
ExtractorError: Unable to login: The email and password you entered don't match.
```

---

Account credentials when specified via command line are used for all the extractors involved in extraction process. For example in aforementioned log VK authentication successfully happens first, then YouTube embed is detected and extraction process is delegated to youtube extractor that tries to login with the same credentials obviously resulting in expected error.
In general authentication error can be worked around with .netrc authentication.
Since it's not feasible to add exclusive `--username/--password` options for each extractor that supports authentication, command line credentials probably should not be considered for any consequent extractor involved apart from the first one.
Repository: three.js
Issue: BoundingBoxHelper for buffer geometry does not use drawrange neither groups 
Labels: Suggestion

##### Description of the problem

BoundingBoxHelper.update (setFromObject)  for buffer geometry does not use drawrange.count ( neither groups), so the limits can include points with 0,0,0 (now it uses positions.length)

if you have the typedarray with data still with 0,0,0, the box dimension figured out is not correct.(0,0,0 is included...) (I have predimensioned positions array and filling  as I need)  

I'm using by now to create pointclouds but I imagine some problems in the future if the bufferGeometry is used to drawlines or triangles (using groups) 

So I this this is a mix of bug & enhance ,? 
...
##### Three.js version
- [ ] Dev
- [x] r76
- [ ] ...
##### Browser
- [x] All of them
- [ ] Chrome
- [ ] Firefox
- [ ] Internet Explorer
##### OS
- [x] All of them
- [ ] Windows
- [ ] Linux
- [ ] Android
- [ ] IOS
##### Hardware Requirements (graphics card, VR Device, ...)
Repository: TypeScript
Issue: Do not rename imports from ambient modules
Labels: Suggestion,Help Wanted,Effort: Moderate

Issue explained by @bbgone in https://github.com/Microsoft/TypeScript/issues/8118#issuecomment-212218038

Renaming an import alias for a module coming from a .d.ts file, renames all instances. this is obviously wrong. 

Options, 1. error (obviously not helpful), 2. only rename local symbol (better, but leaves the code in an invalid state), 3. rename local import and add `as oldname` clause to the import declaration as needed (looks like the best solution).

This is similar to the issue related to https://github.com/Microsoft/TypeScript/issues/7458, except that this issue adds renaming the import alias.
Repository: go
Issue: runtime: significant performance improvement on single core machines
Labels: compiler/runtime

**1. What version of Go are you using (`go version`)?**

```
go version go1.5.4 linux/amd64
```

**2. What operating system and processor architecture are you using (`go env`)?**

```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/root/go"
GOTOOLDIR="/root/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
```

Hosts are running stock Ubuntu 15.10:

```
# uname -r
4.2.0-27-generic
```

**3. What did you do?**
**4. What did you expect to see?**
**5. What did you see instead?**

Looking into performance of running containers on [Docker](https://github.com/docker/docker), we realized there's a significant difference when running on a single core machine versus a multi core machine. The result seem independent of the `GOMAXPROCS` value (using `GOMAXPROCS=1` on the multi core machine remains significantly slower).

Single core:

```
# time ./docker run --rm busybox true
real    0m0.255s
```

Multi core:

```
# time ./docker run --rm busybox true
real    0m0.449s
```

We cannot attribute that difference to Go with a 100% certainty, but we could use your help explaining some of the profiling results we've obtained so far.
##### Profiling / trace

We instrumented the code to find out where that difference materialized, and what comes out is that it is quite evenly distributed. However, syscalls are consistently taking much more time on the multi core machine (as made obvious with slower syscalls such as `syscall.Unmount`).

Using `go tool trace` to dig further, it appears that we're seeing discontinuities in goroutine execution on the multi core machine that the single core one doesn't expose, even with `GOMAXPROCS=1`.

Single core ([link to the trace file](https://www.dropbox.com/s/onxw64prot30kzo/layerStore-singleCore-1?dl=1))

![image](https://cloud.githubusercontent.com/assets/1564054/14695355/2d8d7f38-0726-11e6-8bd5-9ee58d13e94f.png)

Multi core with `GOMAXPROCS=1` ([link to the trace file](https://www.dropbox.com/s/unkchqgegmrey5u/layerStore-multiCore-gomaxprocs1?dl=1))

![image](https://cloud.githubusercontent.com/assets/1564054/14695342/0a8a565a-0726-11e6-8bfc-aca8e0da85fe.png)

[Link to the binary which produced the trace files](https://www.dropbox.com/s/kni7ngcqqfutx1x/docker?dl=1).
##### Host information

The two hosts are virtual machines running on the same Digital Ocean zone, with the exact same CPU (`Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz`). The issue was also reproduced locally with Virtual Box VM with different core numbers.

Please let us know if there's any more information we can provide, or if you need us to test with different builds of Go. Thanks for any help you can provide!

Cc @crosbymichael @tonistiigi.
Repository: go
Issue: go/build: allow Import to ignore build constraints
Labels: NeedsInvestigation

There's no way at the moment to use `Import` or `ImportDir` to select all the files in package ignoring build constraints. There is the `Package.IgnoredGoFiles` field, but that does not extend to finding the dependencies of the ignored files, and so requires extra parsing steps.

One use case for this is in situations like App Engine: we want to select all the source files for an app, but not exclude source file that would be needed to compile a package in other/future versions of Go. So, we want to select files ignoring any go1.x tags.

/cc @dsymonds @adg
Repository: rust
Issue: DWARF does not describe closure type
Labels: A-debuginfo,C-enhancement,P-medium,T-compiler

I wrote a simple test case that makes a closure.  The closure is just:

```
                let f2 = || println!("lambda f2");
```

The resulting DWARF doesn't describe the closure type at all:

```
 <7><11e>: Abbrev Number: 6 (DW_TAG_variable)
    <11f>   DW_AT_location    : 2 byte block: 91 78     (DW_OP_fbreg: -8)
    <122>   DW_AT_name        : (indirect string, offset: 0x92): f2
    <126>   DW_AT_decl_file   : 2
    <127>   DW_AT_decl_line   : 28
    <128>   DW_AT_type        : <0x636>
...
 <1><636>: Abbrev Number: 19 (DW_TAG_structure_type)
    <637>   DW_AT_name        : (indirect string, offset: 0x4c5): closure
    <63b>   DW_AT_byte_size   : 0
```

I was planning to make it so the user can invoke a closure from gdb, but I think this bug prevents that.
Repository: rust
Issue: DWARF doesn't describe use declarations
Labels: A-debuginfo,C-enhancement,P-medium,T-compiler

I wrote a small test program of `use` declarations:

```
pub mod mod_x {
    pub fn f() {
        use ::mod_y::g;

        g();
    }

    pub fn g() {
        println!("X");
    }
}

pub mod mod_y {
    pub fn g() {
        println!("Y");
    }
}

pub fn main() {
    mod_x::f();
}
```

Examining the DWARF, I don't see anything in the body of `f` that reflect the `use` declaration.

What this means is that when stopped in `f` in gdb, name lookup will not work properly -- `call g()` will call the wrong `g`.

`use` declarations can be represented with something like `DW_TAG_imported_declaration` or `DW_TAG_imported_module`.
Repository: go
Issue: cmd/compile: ephemeral slicing doesn't need protection against next object pointers
Labels: Performance,compiler/runtime

```
func f(b []byte) byte {
    b = b[3:]
    return b[4]
}
```

We compile this to something like (bounds checks omitted):

```
    p = b.ptr
    inc = 3
    if b.cap == 3 {
        inc = 0
    }
    p += inc
    return *(p+4)
```

The `if` in the middle is there to make sure we don't manufacture a pointer to the next object in memory.  But the resulting pointer is never exposed to the garbage collector, so that `if` is unnecessary.  Manufacturing a pointer to the next object in memory is ok if that pointer is never spilled at a safe point.  (Bounds checks will make sure such a pointer is never actually used.)

Unfortunately, I don't see an easy way to do this optimization in the current compiler.  Marked as unplanned.

See #14849
Repository: vscode
Issue: Allow to scope settings by platform
Labels: feature-request,config

Hi

I develop on 3 different platform. When synchronizing settings, snippets and so on, i often must change path, adjust font-size, etc...

So, it could be great if we had a per platform settings set (Windows, Mac, Unix)
Repository: TypeScript
Issue: `Result value must be used` check
Labels: Suggestion,Awaiting More Feedback

Hello.

Quite often while working with `ImmutableJS` data structures and other immutable libraries people forget that values are immutable:

They can accidentally write:

```
obj.set('name', 'newName');
```

Instead of:

```
let newObj = obj.set('name', 'newName');
```

These errors are hard to discover and they are very annoying. I think that this problem can't be solved by `tslint`, so I propose to add some sort of `"you must use the result"` check into the compiler. But right now I have no idea how I want it to be expressed in the language, so I create this issue mainly to start a discussion.

Rust lang, for example, solves a similar problem with `#[must_use]` annotation. This is not exact what we want, but it's a good example and shows that the problem is quite common.
Repository: nvm
Issue: Chakra
Labels: OS: windows,feature requests,pull request wanted

Any plans to support versions of node running on [Chakra from Microsoft](https://github.com/nodejs/node-chakracore/releases)?