sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: encoding/json: Decoder internally buffers full input
Labels: Performance

When using the JSON package, if I encode a struct like

``` go
type Data struct {
    Count int
    Names []string
}
```

and then decode it into

``` go
type SmallData struct {
    Count int
}
```

it will still allocate memory for the list of names, even though it just gets thrown away.  This becomes an annoyance when I have several multigigabyte JSON files like this.  It would be neat if the JSON parser could identify what fields it cares about, or somehow be told what fields to ignore, and chuck them.
Repository: rust
Issue: MSVC: support LTCG native libraries in rlibs
Labels: E-hard,O-windows-msvc,C-feature-request

MSVC supports the option to compile native libraries with link-time code generation enabled via the `/GL` switch to the compiler. This cause the compiler to change the format of the `*.obj` file emitted to no longer be a COFF object file. When MSVC's `lib.exe` tool is used to assemble these object files into a `.lib`, it will correctly detect that these are LTCG-enabled files, adding an appropriate symbol table to the archive being generated. This means that when the linker comes along to link the library, the internal symbol table of the archive points at the LTCG files, allowing the linker to find where symbols are and also produce object files on-the-fly.

With rustc, however, the symbol tables for LTCG files can be lost. Whenever a native library is included statically into an rlib, the objects are extracted by the compiler and then re-inserted into an rlib. This operation loses the entries in the symbol table of the rlib (LLVM doesn't understand the format of the file being inserted), causing the linker to later on ignore all LTCG enabled files.

Long story short, if a LTCG enabled C library is linked statically into an rlib, the linker will not resolve any of the symbols in the C library. This means that all native code linked statically to rlibs **cannot have LTCG enabled**, and this is occasionally somewhat difficult to retrofit on existing build systems.

Fixing this will involve improving the merging process of two archives, probably just blindly carrying over the symbol table from one archive to another (at least on MSVC). I'm not sure what the best route to do this is, but our options are:
- Add support to `llvm-ar.exe` to do this.
- Split apart `llvm-ar.cpp` into a library-like interface, and then rewrite the "driver" in rustc itself
- Port `llvm-ar.exe` to Rust, and do everything in Rust

The latter two options have the great benefit of lifting the compiler's dependence on an `ar` tool, which would be nice!
Repository: go
Issue: math/big: printing is non-linear and very slow for large Floats
Labels: NeedsInvestigation

The Text method of big.Float produces a textual representation of the floating point number. I have a program that can create very large numbers and they are slow to print. Moreover, the time to print them does not scale sensibly with the size of the number:

% time ivy -e '1e10000' > /dev/null

real    0m0.005s
user    0m0.002s
sys 0m0.003s
% time ivy -e '1e100000' > /dev/null

real    0m0.032s
user    0m0.027s
sys 0m0.004s
% time ivy -e '1e1000000' > /dev/null

real    0m2.729s
user    0m2.702s
sys 0m0.017s
% time ivy -e '1e10000000' > /dev/null

real    7m11.246s
user    7m7.678s
sys 0m1.834s
% 

I have investigated to some extent and the time is definitely being spent inside Text.
Repository: go
Issue: misc/ios: make it easier to run benchmarks on the device
Labels: NeedsInvestigation

I have some hacks I carry around locally to enable benchmarking on an iOS device:
- Make tests print "DONE" after running benchmarks, similarly to the way they currently print "PASS" after running tests.
- Add an envvar to go_darwin_arm_exec.go to control what string it watches for to detect that a test has completed running, and set that envvar to "DONE" when running benchmarks.
- Add an envvar to go_darwin_arm_exec.go to enable debug mode, rather than it being a constant, and add that envvar when running benchmarks, in order to see incremental output.

This is obviously not a good solution. I don't know what a good solution looks like, but I'd like one. :)

/cc @crawshaw
Repository: kubernetes
Issue: By default, merge more .kubeconfig files
Labels: priority/backlog,area/kubectl,kind/feature,sig/cli,lifecycle/frozen

By default, kubectl should have access to all clusters, users and contexts defined in any .kubeconfig files in any of the following locations:
- Any files or directories specified by KUBECONFIG
- /etc/kubernetes/config/*
- ~/.kube/*

(Today kubectl only loads from ~/.kube/config, or only KUBECONFIG or --kubeconfig if specified.)

This would allow me to do a few things that I can't easily do today:
- /etc/kubernetes/config/*: Use puppet/ansible/chef/etc. to drop separate credential files for each of our clusters into /etc/kubernetes/config/\* to make it really easy for developers to run kubectl --context=<some-cluster> on any server and always get to the right cluster without any configuration on the developers part. (And if there's only one cluster, just run kubectl <cmd> and have it work automatically with no configuration.)
- ~/.kube/*: Download a .kubeconfig file and have access to it immediately just by moving it into ~/.kube/. Today I have to either manually merge the files or specify KUBECONFIG or --kubeconfig (which would then ignore all Preferences in my ~/.kube/config file).
- KUBERNETES_CONFIGS/--kubeconfig: I can download a zip of kubeconfigs, unzip it, and point at it, without losing access to my kubeconfig preferences/current context.

The convention I would follow is that files in any of the above locations would not contain Preferences or CurrentContext to prevent any merging headaches (which is what caused much anger in #4428); those two .kubeconfig fields should only be specified in ~/.kube/config. I would prefer to move them to a different file altogether, but that is a separate discussion.

@jlowdermilk @bgrant0607 @deads2k
Repository: go
Issue: x/mobile: apps crash on darwin/arm64 at draw_arrays(__GLIContextRec*, unsigned int, int, int)
Labels: mobile

Apps crash on darwin/arm at draw_arrays(__GLIContextRec*, unsigned int, int, int) slightly after the launch. It usually takes 3-4 seconds for me to see the EXC_BAD_ACCESS.

I am packing the arm64 binary in a lipo file, my build steps are available for inspection at https://github.com/rakyll/go-xcode/blob/master/Makefile.

```
#0  0x00000001829ef064 in ___lldb_unnamed_function235$$AGXGLDriver ()
#1  0x00000001829eecf0 in agxuBeginRenderCommand(AGXContextRec*, unsigned int, bool, bool) ()
#2  0x00000001829e5bbc in glrAGXRenderVertexArray(GLDContextRec*, unsigned int, unsigned int, int, int, unsigned int, void const*, int, void const*) ()
#3  0x0000000187f90e58 in glDrawArrays_ACC_ES2Exec ()
#4  0x0000000004509b64 in draw_arrays(__GLIContextRec*, unsigned int, int, int) ()
#5  0x00000000040dce9c in _cgo_80207b16a855_Cfunc_process ()
#6  0x0000000004138dd0 in asmcgocall ()
#7  0x00000000040de178 in threadentry ()
#8  0x0000000196317dc8 in _pthread_body ()
#9  0x0000000196317d24 in _pthread_start ()
```

/cc @crawshaw @hyangah @nigeltao @minux
Repository: youtube-dl
Issue: [Errno 36] File name too long on eCryptfs
Labels: bug

Filesystem: EXT4
OS: Ubuntu Linux 14.04 LTS
`youtube-dl --version`: 2015.06.04.1
When I try to download a Vimeo video:

`youtube-dl --ignore-errors --restrict-filenames https://vimeo.com/80352108`

I got the following error:

`ERROR: unable to open for writing: [Errno 36] File name too long: ...`
Repository: go
Issue: runtime: support dlclose with -buildmode=c-shared
Labels: compiler/runtime

``` go
package main

import (
    "C"
    "fmt"
)

var (
    c chan string
)

func init() {
    c = make(chan string)
    go func() {
        n := 1
        for {
            switch {
            case n%15 == 0:
                c <- "FizzBuzz"
            case n%3 == 0:
                c <- "Fizz"
            case n%5 == 0:
                c <- "Buzz"
            default:
                c <- fmt.Sprint(n)
            }
            n++
        }
    }()
}

//export fizzbuzz
func fizzbuzz() *C.char {
    return C.CString(<-c)
}

func main() {
}
```

build this with

```
$ go build -buildmode=c-shared -o libfizzbuzz.so libfizzbuzz.go
```

then go

``` python
from ctypes import *
import _ctypes
lib = CDLL("./libfizzbuzz.so")
lib.fizzbuzz.restype = c_char_p
print lib.fizzbuzz()
print lib.fizzbuzz()
print lib.fizzbuzz()
print lib.fizzbuzz()
print lib.fizzbuzz()
print lib.fizzbuzz()
_ctypes.dlclose(lib._handle)
```

```
1
2
Fizz
4
Buzz
Fizz
Segmentation fault
```
Repository: TypeScript
Issue: Provide an xclangspec file for TypeScript syntax highlighting in Xcode
Labels: Suggestion,Help Wanted

This is a feature request for the TypeScript team to ship an xclangspec file with the TypeScript sources in order to provide support for syntax highlighting of the language in the Xcode IDE.

Google has done the same for their Go language; see here for an example of the xclangspec file format: https://code.google.com/p/go/source/browse/misc/xcode/go.xclangspec?r=30b0c392132645259e053a2ba8904383a55bab03
Repository: go
Issue: x/build: coordinator should keep a small pool of ready-to-go GCE buildlets
Labels: Performance,Builders,FeatureRequest

The coordinator's GCE buildlet pool should always have a few of each type of buildlet ready to go to avoid the start-up latency.

e.g. an idle Plan 9, OpenBSD 32/63, FreeBSD 64 (at least 2x), Linux (probably at least 4x), etc.

Then once we start building them, we also start spinning up the helpers for test sharding.

This will raises costs, but probably shouldn't be too bad.  I'll post some math on the cost here later.

/cc @adg
Repository: nvm
Issue: Error with linked packages when `reinstall-packages`
Labels: shell: zsh: oh-my-zsh

I've got an error at the end of `reinstall-packages` command

```
Linking global packages from iojs-v2.0.0...
nvm:cd:646: no such file or directory: /Users/roadhump/Projects/eslint\n/Users/roadhump/Projects/yeoman-generators/generator-linters
```
Repository: rust
Issue: No error despite of multiple applicable methods in scope
Labels: T-lang,C-bug

Given the following code:

``` rust
extern crate mio;
use mio::buf::RingBuf;
use mio::buf::Buf;
use std::io::Read;

fn main() {
    let buf = RingBuf::new(10);
    let bytes = buf.bytes();
    println!("{:?}", bytes);
}
```

`buf` is of type `RingBuf`. `RingBuf` does not provide `.bytes()`, but it implements both `Buf` and `Read`, which both provide a `.bytes()` implementation.

According to https://doc.rust-lang.org/book/ufcs.html the compiler should complain. But it simply chooses to take the implementation of `Read`, which return the "wrong" result type.

(Without the "use Read" line rust chooses the implementation of `Buf`, which return the "correct" type.)

(I am using Rust 1.0.0.)
Repository: rust
Issue: Closures should always implement the all applicable Fn* traits.
Labels: C-enhancement,P-medium,A-closures,T-compiler

If a closure is passed into a function call as temporary, it only implements the `Fn*` traits needed to satisfy the constraints specified by the function. However, if it is declared first and then moved into the function, it correctly implements all applicable `Fn*` traits.

``` rust
fn strip<F: FnOnce()>(f: F) -> F { f }
fn fail<F: Fn()>(f: F) { f() }

// Works.
fn test_works() {
    let f = || {};
    let f = strip(f);
    fail(f);
}

// Doesn't
fn test_broken() {
    // f only implements FnOnce().
    let f = strip(|| {});
    fail(f);
}

fn main() {}
```
Repository: youtube-dl
Issue: [site-support-request] rat-porn.com
Labels: site-support-request,nsfw

Example URL:
http://www.rat-porn.com/video/312/pretty-18yo-blonde-fucked-on-cam

```
$ youtube-dl -v 'http://www.rat-porn.com/video/312/pretty-18yo-blonde-fucked-on-cam'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.rat-porn.com/video/312/pretty-18yo-blonde-fucked-on-cam']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.29
[debug] Python version 3.4.3 - Linux-4.0.5-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 2.6.3, ffprobe 2.6.3, rtmpdump 2.4
[debug] Proxy map: {}
[generic] pretty-18yo-blonde-fucked-on-cam: Requesting header
WARNING: Falling back on generic information extractor.
[generic] pretty-18yo-blonde-fucked-on-cam: Downloading webpage
[generic] pretty-18yo-blonde-fucked-on-cam: Extracting information
ERROR: Unsupported URL: http://www.rat-porn.com/video/312/pretty-18yo-blonde-fucked-on-cam
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 1504, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.rat-porn.com/video/312/pretty-18yo-blonde-fucked-on-cam
```
Repository: youtube-dl
Issue: [site-support-request] luxuretv.com
Labels: site-support-request

Example URL:
http://en.luxuretv.com/videos/slut-spreads-her-big-breasts-in-front-of-a-webcam-16982.html

```
$ youtube-dl -v 'http://en.luxuretv.com/videos/slut-spreads-her-big-breasts-in-front-of-a-webcam-16982.html'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://en.luxuretv.com/videos/slut-spreads-her-big-breasts-in-front-of-a-webcam-16982.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.29
[debug] Python version 3.4.3 - Linux-4.0.5-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 2.6.3, ffprobe 2.6.3, rtmpdump 2.4
[debug] Proxy map: {}
[generic] slut-spreads-her-big-breasts-in-front-of-a-webcam-16982: Requesting header
WARNING: Falling back on generic information extractor.
[generic] slut-spreads-her-big-breasts-in-front-of-a-webcam-16982: Downloading webpage
[generic] slut-spreads-her-big-breasts-in-front-of-a-webcam-16982: Extracting information
ERROR: Unsupported URL: http://en.luxuretv.com/videos/slut-spreads-her-big-breasts-in-front-of-a-webcam-16982.html
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 1504, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: http://en.luxuretv.com/videos/slut-spreads-her-big-breasts-in-front-of-a-webcam-16982.html
```
Repository: youtube-dl
Issue: [site-support-request] https://couragefound.org/
Labels: site-support-request

https://couragefound.org/2015/06/courage-event-the-digital-surveillance-state-quo-vadis-democracy/

Current youtube-dl e1b9322b091122b6f6832c70e3a845a84ee1764e cannot find the video on this page.
Repository: youtube-dl
Issue: youtube-dl downloads DASH manifest before noticing that the youtube doesn't match the regex given by the --match-title argument
Labels: request

This slows it down quite a bit, especially on longer playlists.
Repository: rust
Issue: Implement likely/unlikely intrinsic (tracking issue for RFC 1131)
Labels: metabug,B-RFC-approved,T-lang,B-unstable,E-help-wanted,C-tracking-issue,A-intrinsics,S-tracking-perma-unstable

Tracking issue for rust-lang/rfcs#1131:
- [x] Implement the likely/unlikely intrinsic
- [ ] Re-export in `std::hint`
- [ ] Document
- [ ] Stabilize
Repository: youtube-dl
Issue: Request to support box.com
Labels: site-support-request

I would like youtube-dl to be able to download from box.com, please.

Example: https://app.box.com/s/yrvxrv91fenex2acvo0zdpbogjjb9jrf
Repository: go
Issue: syscall: forkAndExecInChild assumes clone doesn't block, but it sometimes does
Labels: compiler/runtime

syscall.forkAndExecInChild [uses](https://github.com/golang/go/blob/go1.4.2/src/syscall/exec_linux.go#L85) RawSyscall6 to call clone. This means the goroutine doesn't give up its scheduler slot, making the assumption that clone can't block. But in the case of a program with open files on a fuse file system, clone may block indefinitely. So if the program execs GOMAXPROCS times in parallel, it may lock up and fail to schedule any other runnable goroutines. If the fuse file system is unresponsive or if the fuse server is the same process as has the files open, the program will never make progress.

Here is an example of the kernel stack for a thread that is blocking in sys_clone on behalf of an os/exec.Cmd on Linux 3.19.0-16-generic (Ubuntu 15.04):

```
[<ffffffff812e708d>] __fuse_request_send+0xcd/0x290
[<ffffffff812e7262>] fuse_request_send+0x12/0x20
[<ffffffff812f0d6d>] fuse_flush+0x12d/0x170
[<ffffffff811f0ac3>] filp_close+0x33/0x80
[<ffffffff81212168>] put_files_struct+0x78/0xd0
[<ffffffff8121226b>] exit_files+0x4b/0x60
[<ffffffff810736c4>] copy_process.part.27+0x8e4/0x1b10
[<ffffffff81074aa1>] do_fork+0xd1/0x350
[<ffffffff81074da6>] SyS_clone+0x16/0x20
[<ffffffff817c9699>] stub_clone+0x69/0x90
[<ffffffffffffffff>] 0xffffffffffffffff
```

I previously filed #10202 about a similar issue with syscall.Dup2, which Ian fixed in 28074d5baad961f931df9895c57a82d164641f06. Can a similar fix be made here? I know there are tricky issues with the fork lock, but I don't pretend to be familiar enough to say.
Repository: kubernetes
Issue: Bulk creation API
Labels: priority/backlog,area/api,area/app-lifecycle,sig/api-machinery,kind/feature,lifecycle/frozen

I have a list of services defined under a json having "kind" : "list"

I'm using the v1beta3 API version.

However, I don't see any endpoint to launch a list resource.

I'm following the Swagger spec on http://kubernetes.io/third_party/swagger-ui/#!/v1beta3/listService to see the endpoints.

Is there any way to use the API to launch multiple services using a single json/yaml with kind=list?
Repository: go
Issue: os/exec: provide better support for creating pipelines
Labels: help wanted,FeatureRequest

Creating pipelines using os/exec is somewhat tedious.  There are a couple of good external packages that provide higher-level interfaces:
  http://godoc.org/gopkg.in/pipe.v2
  http://godoc.org/github.com/ghemawat/stream

Brad asked me to file an issue to think about making this better for Go 1.6.

Related: it's common to want the text of stderr on failure, but not as CombinedOutput.  The pipe package calls this DividedOutput: http://godoc.org/gopkg.in/pipe.v2#DividedOutput
Repository: youtube-dl
Issue: Add ID3 tags to MP3 files (was: Thumbnail shows in VLC, but not Windows Media Player?)
Labels: request,postprocessors

Running the following creates an mp3 file and the corresponding thumbnail:

> youtube-dl --write-thumbnail --embed-thumbnail -x --audio-format mp3 https://www.youtube.com/watch?v=v2AC41dglnM

If I open the mp3 with VLC, the thumbnail shows, but if I open it with Windows Media Player it doesn't. What am I doing wrong? How can I make it show in Windows Media Player as well?
Repository: go
Issue: cmd/compile/ssa: duplicate block elim
Labels: NeedsInvestigation

``` go
package p

func g_ssa(a, b int) int {
    if a < 5 {
        return 1
    }
    if b < 5 {
        return 1
    }
    return 0
}
```

At the end of the layout pass (chosen for readability--this remains true at the end of compilation), the SSA looks like:

```
g_ssa <nil>
  b1:
    v1 = Arg <mem> [.mem]
    v2 = FP <uint64>
    v18 = MOVQconst <int> [1]
    v22 = MOVQconst <int> [0]
    v28 = MOVQload <int> [0] v2 v1
    v32 = MOVQload <int> [8] v2 v1
    v24 = CMPQconst <flags> [5] v28
    v7 = MOVQstore <mem> [16] v2 v22 v1
    LT v24 -> b3 b4
  b3:
    v14 = MOVQstore <mem> [16] v2 v18 v7
    Plain -> b2
  b2:
    v29 = Phi <mem> v14 v21 v25
    Exit v29
  b4:
    v20 = CMPQconst <flags> [5] v32
    LT v20 -> b5 b6
  b5:
    v21 = MOVQstore <mem> [16] v2 v18 v7
    Plain -> b2
  b6:
    v25 = MOVQstore <mem> [16] v2 v22 v7
    Plain -> b2
```

Note that blocks `b3` and `b5` are effectively identical. One of them could be eliminated.

This happens fairly often in practice. For example, our generated equality code looks like:

``` go
func eq(a, b T) {
    if a.X != b.X {
        return false
    }
    if a.Y != b.Y {
        return false
    }
    return true
}
```

This ought to produce code that is just as efficient as:

``` go
func eq(a, b T) {
    return a.X == b.X && a.Y == b.Y
}
```

Right now it doesn't, but we can do better. There's also a lot of code in the compiler that looks like this. Also complex Less methods for sort.Interface.

Is this worth doing? Ought this to occur as part of an existing pass, or as a new one?
Repository: rust
Issue: Indicate which version of MSVC Rust was built with
Labels: O-windows-msvc,C-feature-request

When linking to the CRT on Windows, all code that is statically linked together needs to use the same version of the CRT. Different versions of the CRT (aka they have different DLL names) are not ABI compatible, so `msvcrt120.dll` and `msvcrt110.dll` are not ABI compatible. In particular, almost all Rust code links statically to `libstd`, so the version of the CRT that `libstd` uses needs to be same version of the CRT that Rust code using that `libstd` is using.

For the gnu version of Rust, it relies on `msvcrt.dll` and since all versions of MinGW will link to `msvcrt.dll` everything is fine and dandy.

However, for the MSVC version of Rust, it is linked against a specific versioned CRT such as `msvcrt120.dll`. Since the version of the CRT depends on which version of MSVC you build your code with, there is a possibility for you to use a different version of the CRT than `libstd` was built with, causing room for potential ABI issues. There's even separate debug/release versions of the CRT for each version, as well as static/dynamically linked versions of the CRT.

Therefore, to ensure that there is no ABI compatibility issues, distributions of the MSVC version of Rust should indicate exactly which version of MSVC and the CRT they were built with.

Note that this is purely an issue for developers using Rust to build their code with the msvc toolchain. End-users of binaries built by Rust merely need to have the appropriate redistributable installed and there's no ABI concerns there.
Repository: go
Issue: x/review/git-codereview: mail must update the reviewer list even if there are no staged changes
Labels: NeedsInvestigation

mail rejects to update the reviewer list if there are no staged changes. This behaviour is breaking a common use-case where the contributor creates a CL with no reviewers, review his/her changes on Gerrit and add reviewers. Allow mail subcommand to update the reviewers list even if there are no changes.
Repository: TypeScript
Issue: Explicit any type in for..in loop
Labels: Suggestion,Awaiting More Feedback

For the reason of consistency, it should be possible to explicitly annotate the iterator variable at least with the "any" type in a for..in loop.

*Edit from @sandersn: Fixes should apply to JSDoc too: https://github.com/microsoft/TypeScript/issues/43756, and perhaps allow annotations on `for .. of` too*
Repository: youtube-dl
Issue: Glomdalen.no (site-support-request)
Labels: site-support-request

Hello! Thank you for a great service. I would be really happy if you would add support for Glomdalen.no. Here is an example:

http://www.glomdalen.no/tv/er-dette-offside-5-19-69221.html

I think this is similar to other newspapers, such as ba.no, which I believe you support, but I couldn't find a way to make it work for Glomdalen.no ... 

Thank you very much! :-)