sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/image/font: add a tool for running Unicode’s text rendering tests
Labels: Testing,NeedsDecision

Would you be interested in testing the Go font library through [Unicode text rendering tests](https://github.com/unicode-org/text-rendering-tests)?

I’m maintaining this test suite for Unicode, and would volunteer to do the integration with the test framework. But somebody familiar with Go would have to write a command-line tool that can be called like this:

```
path/to/some-command --font=fonts/TestCMAP14.otf --testcase=Foo-5/6 --render=≩≩
```

This should write an SVG file to standard output, looking like this:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    viewBox="0 -120 1446 1200">
  <symbol id="Foo-5/6.uni2269" overflow="visible"><path d="M100,334 L623,563 L623,619 L100,880 L100,793 L518,594 L100,420 Z M100,208 L622,208 L622,287 L100,287 Z M100,38 L622,38 L622,117 L100,117 Z M282,-93 L508,379 L436,413 L211,-59 Z"/></symbol>
  <use xlink:href="#Foo-5/6.uni2269" x="0" y="0"/>
  <use xlink:href="#Foo-5/6.uni2269" x="723" y="0"/>
</svg>
```

For test cases on variable fonts, your tool would be called with an additional argument for the variation settings, such as `--variation=wght:481.3;wdth:70`. Initially, you could ignore this.

The test fonts are [here](https://github.com/unicode-org/text-rendering-tests/tree/master/fonts). If you write a command-line tool that can be called as described, the generated test report will look like [this](https://rawgit.com/unicode-org/text-rendering-tests/master/reports/FreeStack.html), [this](https://rawgit.com/unicode-org/text-rendering-tests/master/reports/CoreText.html), [this](https://rawgit.com/unicode-org/text-rendering-tests/master/reports/fontkit.html), or [this](https://rawgit.com/unicode-org/text-rendering-tests/master/reports/OpenType.js.html).
Repository: go
Issue: proposal: spec: disallow LTR/RTL characters in string literals?
Labels: Proposal,Proposal-Hold

TL;DR https://play.golang.org/p/LPkPTRF7fC

The above code looks quite plain and obvious, except it does something completely different than you'd expect (feel free to run it). The obvious thing that should happen is that it counts the number of bits set in the given string. The non-obvious thing that happens is that the mask is actually `0`, not `0x01`.

So, what happened there? The abuse in the above code is around the invisible Unicode characters that mark following text to be right-to-left or left-to-right. Since Go permits arbitrary Unicode characters to be present in string literals, it also allows me to have a string of the form "bla bla bla<right-to-left>abc<left-to-right>". Since we're dealing with valid Unicode sequences here, any modern editor/website will actually interpret those special characters, causing the content in between the two special marks to be reversed to the end of the line (alas still part of the string literal).

In my playground code this is abused by having the following source code:

```
str, mask := "Hello, World!<rtl>10x<ltr>", 0
```

Which will be displayed by all modern editors/websites as:

```
str, mask := "Hello, World!", 0x01
```

The security aspect of this issue is social engineering attacks. The "display" line of my sample code is obvious beyond doubt, so noone will ever inspect such a thing; however it managed to flip one bit in a mask (imagine doing this for file permission umasks). The issue is that such code could easily get past reviews and into a final product.

The tricky part is how to avoid these issues. My only meaningful suggestion would be to disallow these two special characters in string literals. This does break Go 1.0 compatibility guarantees, however I think it's worth it (I can't really figure out a meaningful use case for it). Using it in a single line string will screw up the display of the source code, so it doesn't make sense to do it, and using it in a multi line string is questionable at best. I think requiring users to explicitly use `\x` notation for adding these characters it a good compromise to protect source code sanity.
Repository: neovim
Issue: Resize windows "upwards"
Labels: enhancement,ui

AFAICT (documentation and brief source check), window resizing always goes "downwards"; if a window is expanded or shrunk, it shrinks or expands the buffer below it unless there is no downward space, and only then shrinks the buffer above.

However, sometimes I have buffers above the current window that I'd rather shrink when I expand the current window.

I suppose that can reasonably be scripted, though it's slightly painful due to #6643.  If there's pushback, that's a fine solution, but I don't see any major reason why there couldn't be a flag to resize upwards rather than downwards.

As a concrete example consider the following sequence from a fresh `nvim -u NORC`:
```
:sp
:sp
:wincmd j
:resize +3
```
Maybe window 3 was exactly as big as I want it, but I really only need window 1 to be a couple lines.  Currently, I have to replace `:resize +3` with either `:wincmd k | resize -3 | wincmd j` or `1 resize -3` (though as noted in #6643, that doesn't quite do what you expect), which are both uglier and are fragile if there are multiple windows above the current one.  Why not just have something like `:resize up +3`?
Repository: neovim
Issue: :Install command (was: "add windows explorer integration")
Labels: enhancement,platform:windows,ux,complexity:low

Would be good to have something like `nvim --register` so it can register OS integrations (Vim has install.exe). Most likely this would be a neovim-qt feature.

Having `Edit in NeoVim` would be the minimal requirement but better if it can also figure out all open instances of neovim and have an ability to open in that particular instance like how vim does. In this example I have two separate instances of vim already opened - setenv.cmd and .vimrc.

![image](https://cloud.githubusercontent.com/assets/287744/25627539/becae23c-2f17-11e7-8d5f-a501f0889a5e.png)
Repository: neovim
Issue: set job priority / niceness
Labels: enhancement,job-control

It would be nice if you could configure the niceness of a job process via its options.

This was asked for Neomake in https://github.com/neomake/neomake/issues/1271.

I've looked quickly at libuv, but it does not appear to have native support for it?

The workaround is to either wrap the command in `nice` before starting the job (more difficult for Neomake, since `argv` can be a string or list etc), or adjusting the niceness once the job is started (https://github.com/neomake/neomake/pull/1273 - this adds an additional `system()` call though).
Repository: pytorch
Issue: Optimizers can't be moved to a different GPU
Labels: feature,triaged

There is currently no good way to set the GPU id for an optimizer state. This is particuarly relevant in the use case that model training stops, and needs to be restarted on a different gpu.

I'm currently working around that problem with the following:
```
def set_gpu_recursive(var, gpu_id):
    for key in var:
        if isinstance(var[key], dict):
            var[key] = set_gpu_recursive(var[key], gpu_id)
        else:
            try:
                var[key] = var[key].cuda(gpu_id)
            except:
                pass
    return var

opt.load_state_dict(torch.load(opt_save_path))
opt.state = set_gpu_recursive(opt.state, gpu_id)
```
Repository: go
Issue: cmd/compile: missing line numbers with cgo pragmas
Labels: NeedsInvestigation,compiler/runtime

Reproduce: `go install -race cmd/compile`, `compilebench -run=SSA -cpuprofile=c`, `go tool pprof -lines $(go tool -n compile) c`.

Result: entries like `__tsan_read :-134217728`. That's no filename, line number underflow. Ideally it'd refer to the place where the symbol was defined. We have the position information as we enter `pragcgo` in the compiler, but it never gets recorded in `pragcgobuf`. Not sure how much work would be required to thread it through from there.
Repository: opencv
Issue: opencv builds unusable instruction sets
Labels: incomplete

I was trying to install caffe and it gave me a wonderful error message stating that opencv had instructions sets built that couldn't be used. So, naturally I rebuilt opencv with those problematic instruction sets explicitly turned off. Below is that cmake command. Caffe no longer gave me that error message. I'm on a intel 2600k processor so that's why AVX2 is turned off. 

`sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -D BUILD_EXAMPLES=ON -D WITH_TBB=ON -D WITH_OPENMP=ON -D WITH_IPP=ON -D ENABLE_AVX=ON -D ENABLE_POPCNT=ON -D ENABLE_SSE41=ON -D ENABLE_AVX2=OFF -D ENABLE_FP16=OFF -D ENABLE_FMA3=OFF -D ENABLE_SSE42=ON -D ENABLE_SSSE3=ON -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda ..`

I'm submitting this as an issue because the cmake script should be catching this type of thing. I'm not sure if cmake has functionality for checking what can be built directly or if test projects are required.
Repository: neovim
Issue: win: tui: support :stop, :suspend (CTRL-Z)
Labels: platform:windows,tui

https://github.com/neovim/neovim/pull/6315#issue-215261397
Repository: go
Issue: encoding/gob: document or improve handling of untrusted data
Labels: NeedsDecision

It is pretty easy to construct small malicious encoding/gob packets with large impacts, e.g. by using a large map hint (CL 40113).

I don't see:

* anything in the encoding/gob docs that discusses safe handling of untrusted data
* anything in the encoding/gob API that would support checking whether untrusted data is safe to decode
* anything in the implementation that ensures e.g. that there is a relationship between the amount of data and the memory used; if there were limits on amplification, then a `io.LimitedReader` could be used

Although maybe I missed something.

It seems like we should add some or all of the above.

cc @bradfitz @gruszczy @randall77 @robpike
Repository: TypeScript
Issue: Filling in an implementation using VS Code will expand types
Labels: Bug,VS Code Tracked,Domain: Quick Fixes

```ts
type Foo = [string, number];

interface Bar {
  test(a: Foo): void;
}

class Baz implements Bar{
}
```

Using fill in Baz implementation quick fix:

```ts
type Foo = [string, number];

interface Bar {
  test(a: Foo): void;
}

class Baz implements Bar {
  test(a: [string, number]): void {
    throw new Error("Method not implemented.");
  }
}
```

I expect:

```ts
class Baz implements Bar {
  test(a: Foo): void {
    throw new Error("Method not implemented.");
  }
}
```

/cc @mjbvz
Repository: pytorch
Issue: Change sparse_mask to take indexing mask, rather than entire sparse tensor
Labels: module: sparse,feature,triaged

Currently, sparse_mask takes a sparse tensor, throws out the values, and uses just the indices to mask a dense tensor. This is not a very good API; for one, it causes trouble when the mask tensor is of different type of the dense tensor you're masking (this shouldn't cause any problems, but right now the dispatcher chokes, because it requires them to be the same.)

So let's introduce a new function: `sparse_select`, which takes JUST the indexing mask, and produces a sparse vector of just those indices selected.

There is one minor downside to doing things this way, which is that we lose information about whether or not the indices are coalesced or not.

----

**Old description.** Recently I got this error:

```
  File "/Users/ezyang/Dev/pytorch/torch/optim/sgd.py", line 93, in step
    d_s = (state['step'] - state['last_update']._sparse_mask(d_p.long())).type_as(p.data)
TypeError: _sparse_mask received an invalid combination of arguments - got (torch.sparse.LongTensor), but expected (torch.sparse.IntTensor mask)
```

That's a bit silly: in the end you're only ever going to use the indices of the sparse mask tensor, so you don't really care about what the values in the mask tensor.

Unfortunately, making sparse_mask polymorphic over the type of the mask tensor seems a bit fiddly to do (one existing function which is similarly polymorphic is `copy`, but the way it is polymorphic is by generating a copy of the function for each type.

Another strategy would be to introduce a variant of sparse_mask which takes only the index tensor, rather than the entire sparse tensor. This would be similar to index_select, but index_select indexes along a dimension, whereas with sparse_mask we have the coordinates for all dimensions.

Additionally, to a certain degree you can work around this problem:

1. If you don't care about efficiency, you can cast the sparse mask to the required type to make the dispatcher stop complaining. If you do care about efficiency, you could probably make a fake value tensor to get it the right type.

2. If your update is purely additive, you can use `spadd` to apply your sparse vector of additions to the new tensor. (For example, this is true for adagrad.) If you don't care about efficiency, you can manually difference out the original value so that you have an additive update.

3. If your sparse tensors are 1D, index_select and related functions can serve your needs.

cc @vincentqb
Repository: svelte
Issue: Browser support
Labels: popular,documentation

A few people have asked about browser support. We probably should be able to answer the question conclusively (maybe even running some tests in Browserstack or whatever?), and perhaps tell people which polyfills they'll need.

For example, `window.performance.now` isn't supported in IE9, but is used in transitions (https://github.com/sveltejs/svelte/pull/525#discussion_r114223085).
Repository: go
Issue: math/big, go/constant: fuzz with go-fuzz
Labels: Testing,help wanted

go-fuzz found a few math/big and go/constant bugs indirectly, via go/types and cmd/compile:

https://github.com/golang/go/issues/20227
https://github.com/golang/go/issues/20228

That's a pretty inefficient way to find them, though. We should run it on them directly and flush out a few more.

@ALTree @dvyukov
Repository: go
Issue: encoding/base64: integer overflow in (*Encoding).EncodedLen
Labels: help wanted,NeedsFix

### What version of Go are you using (`go version`)?

1.8.1

### What operating system and processor architecture are you using (`go env`)?

linux/386

### What did you do?

I called `base64.RawStdEncoding.EncodedLen()` with `1<<30` (2 to the 30th power) on a 32-bit platform, as in line 9 of https://play.golang.org/p/mV9110MxJ- , and `base64.StdEncoding.EncodedLen()` with `1<<31 / 4 * 3` (equal to 1,610,612,736) as in line 10 of the same example.

Line 10 also calls the method with the same argument on `base64.StdEncoding` for comparison.


### What did you expect to see?

I expected `EncodedLen()` on `RawStdEncoding` to return a value close to that returned by `StdEncoding` for `1<<30`I think 1,431,655,766 is the correct value, but I may have miscalculated) and `EncodedLen()` on `StdEncoding` to not return a negative encoded length for `1<<31 / 4 * 3` (perhaps to panic? I'm not certain what the appropriate behavior here is).

### What did you see instead?

Instead the first example returned `0` and the second `-2147483648`. Neither of these values are sufficient to hold a base64 encoding of a string of the supplied lengths.
Repository: pytorch
Issue: avg_pool functions hold input for backward
Labels: feature,triaged,module: pooling

on backward avg pool only uses shape of the saved tensor, not the actual tensor, we should thus only hold shape, but this needs modifications in THNN and THCUNN.

https://github.com/pytorch/pytorch/blob/master/torch/nn/_functions/thnn/pooling.py#L316
Repository: go
Issue: x/mobile: gomobile build ios app can not be upload to itunes connect
Labels: mobile

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
go 1.8
gomobile version +0f31740 Wed Apr 19 17:20:05 2017 +0000 (android,ios); androidSDK=
### What operating system and processor architecture are you using (`go env`)?
macos
xcode 8.1
### What did you do?
build example flappy and upload it to itunesconnect
edit below and go install gomobile
--- a/cmd/gomobile/build_iosapp.go
+++ b/cmd/gomobile/build_iosapp.go
@@ -31,7 +31,8 @@ func goIOSBuild(pkg *build.Package) (map[string]bool, error) {
        infoplist := new(bytes.Buffer)
        if err := infoplistTmpl.Execute(infoplist, infoplistTmplData{
                // TODO: better bundle id.
-               BundleID: "org.golang.todo." + productName,
+               BundleID: "org.xxxx.mug",
                Name:     strings.Title(path.Base(pkg.ImportPath)),
        }); err != nil {
                return nil, err
@@ -366,6 +367,7 @@ const projPbxproj = `// !$*UTF8*$!
         CLANG_WARN_UNREACHABLE_CODE = YES;
         CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
         "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+       DEVELOPMENT_TEAM = xxxxxxxxx;//
         COPY_PHASE_STRIP = NO;
         DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";

gomobile build  -target=ios golang.org/x/mobile/example/flappy
flappy.app   --itunes-->   flappy.ipa
xcode Application Loader Upload. 

### What did you expect to see?
go build app upload success

### What did you see instead?
 Application Loader  Reports 
ERROR ITMS-90161: "Invalid Provisioning Profile. The provisioning profile included in the bundle org.xxxx.mug [Payload/flappy.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal."

Bundle id is correct.  Provision profile exist.
Repository: vscode
Issue: Stop rendering pseudo-italic fonts when italic is not available
Labels: feature-request,upstream,font-rendering

When using fonts which don't have italic variants, such as Fira Mono, VScode renders them anyway, using a simple skew. Goes the same for emojis.

This looks quite bad, and should be avoided.
Repository: vscode
Issue: [html] provide translations of tag documentation
Labels: feature-request,html,l10n-platform

- VSCode Version: Code 1.11.2 (6eaebe3b9c70406d67c97779468c324a7a95db0e, 2017-04-13T08:03:11.395Z)
- OS Version: Windows_NT ia32 10.0.14393
- Extensions: none
---

Steps to Reproduce:
Almost stuffs are displayed in Korean becuase dispaly language is already configured to "ko(Korean)". But intelliSense of HTML is not.  

1.  Mouse over HTML tag.
2. The information popped up under the cursor is not displayed in Korean.
3. 
![vscode4](https://cloud.githubusercontent.com/assets/5915404/25708782/7992b9f8-3122-11e7-8e35-7578a1f3063d.png)
Repository: vscode
Issue: Improved search in "Go to file" panel
Labels: feature-request,search,quick-open

Would love to see a more accurate search for what I'm actually searching for. For example when I'm searching for "archive" and I'am in mid sentence i get these results:

![image](https://cloud.githubusercontent.com/assets/8997319/25721150/bc83aa46-310f-11e7-9edf-6ce228bd7ec4.png)

I think, at least for me that the index.js inside the archive folder file is much more relevant than the .babelrc and yarn.lock. Sublime on the other hand does exactly what I want. 

![image](https://cloud.githubusercontent.com/assets/8997319/25721267/16265666-3110-11e7-8bda-1f630b3f81f6.png)

This change would make the workflow with VS Code even better than it already is 😄
Repository: rust
Issue: Reordering where clauses can change program behavior
Labels: A-trait-system,T-compiler,C-bug,T-types

Here's a contrived example:

```rust
use std::fmt::Debug;

trait Left<T> {}
trait Right<T> {}

trait Join<U> {
    fn test();
}

// With the reordering,
//   impl<T, U> Join<U> for T where T: Right<U>, T: Left<U>, U: Default + Debug {
// you'll get a different output
impl<T, U> Join<U> for T where T: Left<U>, T: Right<U>, U: Default + Debug {
    fn test() {
        println!("{:?}", U::default())
    }
}

impl<T, U: Default + Debug> Left<U> for T {}
impl<T, U: Default + Debug> Right<U> for T {}

fn try_it<T: Default + Debug>() where T: Left<bool>, T: Right<()> {
    <T as Join<_>>::test()
}

fn main() {
    try_it::<u8>() // the type here is irrelevant
}
```

In the order given, the output is `false`. If you swap the order as suggested in the comment, the output is `()`.

What's happening here is a combination of a few things. The `Join` impl creates obligations in order of its where clauses, and the solution to each obligation informs inference, which affects future obligations. At the same time, when it comes time to show `T: Left<U>`, for example, it can be proved either by virtue of the blanket impl or the where clause on `try_it`. We currently give preference to the where clause, which then drives inference.

The same mechanisms also lead to cases where:

1. Adding a valid where clause can cause code to stop compiling.
2. Adding a where clause can change program behavior.

These issues seem fairly fundamental to the where clause preference approach, which is something we likely cannot change backwards compatibly (and there were good reasons for it in the first place). So it's possible that we will just have to live with these consequences. But I wanted to file a bug for posterity.
Repository: javascript
Issue: Documentation: react/jsx-filename-extension can break checks without --ext arguments
Labels: pull request wanted,editorial

Adding the `react/jsx-filename-extension` is just fine as a rule, but adding some direction that you will need to add the `--ext=js --ext=jsx` arguments to the eslint cli for it to work. It might cause issues for users who are not aware of this when they start using the `eslint-preset-airbnb` package. Adding a line to the README might be helpful, and I would be happy to do so. 😄 

Ideally, you could configure this as an option in `.eslintrc` but that is not currently available: 
https://github.com/eslint/eslint/issues/801
Repository: flutter
Issue: If a line is ellipsised, the text alignment is applied to the truncated line before the ellipsis is added
Labels: engine,a: typography,has reproducible steps,P2,team-engine,triaged-engine,found in release: 3.19,found in release: 3.20

```dart
import 'package:flutter/material.dart';
import 'dart:ui';

void main() {
  runApp(new MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new CustomPaint(
      painter: new Eazel(),
    );
  }
}

class Eazel extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    ParagraphBuilder builder = new ParagraphBuilder(
      new ParagraphStyle(
        textAlign: TextAlign.right,
        maxLines: 2,
        fontSize: 30.0,
        fontFamily: 'monospace',
        ellipsis: '---',
      ),
    );
    builder.addText('012345678901234567890123456789');
    Paragraph p = builder.build();
    p.layout(new ParagraphConstraints(width: 190.0)); // width of '0123456789'                                                                                                      
    canvas.drawParagraph(p, const Offset(100.0, 200.0));
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) => true;
}
```

...renders:

```

     0123456789
         012345---

```
Repository: flutter
Issue: Cannot draw right-aligned or centered text without width constraint
Labels: c: new feature,framework,a: internationalization,a: typography,P2,team-framework,triaged-framework

You cannot draw text that is right-aligned or centered, if you want it to be completely unconstrained (so it will overflow or get clipped, rather than wrapping).

If you left-align the text you can set its width constraint to infinity, but since we use that constraint to align the text, if it's infinite, the text will not be visible.