sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Ballistic simulations may be created too frequently
Labels: framework,c: performance,f: scrolling,P2,team-framework,triaged-framework

Make a normal fling gesture. 
~50% of the time, many goBallistic calls are triggered when I would have expected just one. 

In this example, it took 78ms cumulative recreating the simulations and causes frame drops. 
![cw5hukq7xsp](https://user-images.githubusercontent.com/156888/29236274-6aabf178-7ebd-11e7-88e3-7a001e3a2653.png)

Call stack
```
#0      ScrollPositionWithSingleContext.goBallistic (package:flutter/src/widgets/scroll_position_with_single_context.dart:150:16)
#1      BallisticScrollActivity.applyNewDimensions (package:flutter/src/widgets/scroll_activity.dart:399:14)
#2      ScrollPosition.applyNewDimensions (package:flutter/src/widgets/scroll_position.dart:441:14)
#3      ScrollPositionWithSingleContext.applyNewDimensions (package:flutter/src/widgets/scroll_position_with_single_context.dart:110:29)
#4      ScrollPosition.applyContentDimensions (package:flutter/src/widgets/scroll_position.dart:411:7)
#5      RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:827:20)
#6      RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1767:7)
#7      PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1056:18)
#8      BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:251:19)
#9      BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:504:22)
#10     BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189:5)
#11     BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:695:15)
#12     BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:643:9)
#13     _invoke (file:///Users/xster/development/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:86)
#14     _drawFrame (file:///Users/xster/development/flutter/bin/cache/pkg/sky_engine/lib/ui/hooks.dart:75)
```
Repository: go
Issue: cmd/compile: coalesce consecutive calls to print/println
Labels: Performance,NeedsDecision

CLs 55095–55098 change how the compiler (and runtime) implement the built-ins print and println, in order to reduce the amount of code they generate. (The goal is to both reduce the runtime's binary footprint and to increase instruction density in important runtime routines.)

This issue spells out one further obvious optimization. Consider:

```go
  println("a")
  println("b")
```

After CL 55098, this is gets compiled into: printlock, print "a\n", printunlock, printlock, print "b\n", printunlock. But it could get compiled into: printlock, print "a\nb\n", printunlock. In short, coalesce consecutive calls to print/println in a single printlock-protected sequence of calls, combining string constants as possible, taking care to correctly handle the spaces and newlines introduced by println.

Low priority, but might be an interesting learning exercise for someone interested in the mid-tier of the compiler. It's not super straightforward, since walkprint looks at one node at a time, but it also shouldn't *too* difficult.
Repository: vscode
Issue: Can't drag selected text with Ctrl to second file
Labels: feature-request,editor-drag-and-drop

- VSCode Version: Code 1.14.2 (cb82febafda0c8c199b9201ad274e25d9a76874e, 2017-07-19T23:34:09.706Z)
- OS Version: Windows_NT ia32 6.3.9600
------------------------------------------------
Hi,
See this gif:
![mgh](https://user-images.githubusercontent.com/5067331/29243110-db90592a-7fac-11e7-82b8-72ae0f6a8826.gif)

Thanks
@bpasero @rebornix @alexandrudima
Repository: pytorch
Issue: Add CRF Layer
Labels: feature,module: nn,triaged

I use blstm-crf in advance_tutorial， but it runs very slow, can you add crf layer in pytorch？

cc @albanD @mruberry
Repository: go
Issue: x/crypto/ssh: ssh connections and channels should be cancelable
Labels: NeedsInvestigation

When using x/crypto/ssh in a long-running program for communicating with many nodes that may come and go, it is necessary to be able to shutdown started SSH connections and channels cleanly. Currently there are many goroutines leaked. 

For example, https://github.com/golang/crypto/blob/master/ssh/connection.go#L79 the DiscardRequests function is launched in its own go routine for each new connection, and there is no way, currently, to shut it down. It thus leaks memory.

Moreover in order to make the internals of the (brilliant, fabulous) ssh library cancellable, each instance of a raw send and receive will need to be put with a select statement that includes a cancellation signal.  I suggest implenting cancellation by adding context.CancelFunc and context.Context to the Config structure.

I've made these changes in a branch, here https://github.com/glycerine/crypto/tree/cancelable

These likely are not perfect or to anyone else's taste exactly, but feel free to mold to taste.

@hanwen this may be of interest.
Repository: pytorch
Issue: Hard-negative mining using __getitem__ directive in Dataset class
Labels: module: dataloader,triaged

If I wish to do online hard negative mining (for triplet based algorithms), then I wish to send the recent state dict of my network to the data loader to evaluate the criterion and select the negative. Currently, you need to have a lot of workaround for this to get it working. I think the major limitation is the usage of the __getitem__ directive. Can we have a more flexible approach which allows to send arbitrary number of parameters? Or is there a solution in the current situation which I am not aware of? 


Thanks.

cc @SsnL
Repository: vscode
Issue: Cleanup ExtensionContext.workspaceState when a workspace no longer exists
Labels: feature-request,workbench-state
Repository: go
Issue: cmd/compile: optimize unsigned comparisons with zero/one
Labels: Suggested,Performance,help wanted,compiler/runtime

I started on an minor optimization effort earlier this summer that I won't have time to see through for 1.10. This issue is a snapshot of the work and a description of what to do next, in case anyone else wants to pick an architecture to work on and run with it.

Comparing unsigned ints with zero/one is special and (perhaps surprisingly) not uncommon. One example: Given unsigned x, `x > 0` iff `x != 0`. This is helpful, because on many architectures, x == 0 and x != 0 are faster and/or shorter. For example, on amd64, we can use TEST instead of CMP, and arm64 has dedicated instructions for comparison with zero.

Here are some generic rewrite rules that I believe to be sound:

```
(Greater64U x zero:(Const64 [0])) -> (Neq64 x zero)
(Greater32U x zero:(Const32 [0])) -> (Neq32 x zero)
(Greater16U x zero:(Const16 [0])) -> (Neq16 x zero)
(Greater8U  x zero:(Const8  [0])) -> (Neq8  x zero)

(Leq64U x zero:(Const64 [0])) -> (Eq64 x zero)
(Leq32U x zero:(Const32 [0])) -> (Eq32 x zero)
(Leq16U x zero:(Const16 [0])) -> (Eq16 x zero)
(Leq8U  x zero:(Const8  [0])) -> (Eq8  x zero)

(Geq64U _ (Const64 [0])) -> (ConstBool [1])
(Geq32U _ (Const32 [0])) -> (ConstBool [1])
(Geq16U _ (Const16 [0])) -> (ConstBool [1])
(Geq8U  _ (Const8  [0])) -> (ConstBool [1])

(Less64U _ (Const64 [0])) -> (ConstBool [0])
(Less32U _ (Const32 [0])) -> (ConstBool [0])
(Less16U _ (Const16 [0])) -> (ConstBool [0])
(Less8U  _ (Const8  [0])) -> (ConstBool [0])

(Less64U x (Const64 <t> [1])) -> (Eq64 x (Const64 <t> [0]))
(Less32U x (Const32 <t> [1])) -> (Eq32 x (Const32 <t> [0]))
(Less16U x (Const16 <t> [1])) -> (Eq16 x (Const16 <t> [0]))
(Less8U  x (Const8  <t> [1])) -> (Eq8  x (Const8  <t> [0]))

(Geq64U x (Const64 <t> [1])) -> (Neq64 x (Const64 <t> [0]))
(Geq32U x (Const32 <t> [1])) -> (Neq32 x (Const32 <t> [0]))
(Geq16U x (Const16 <t> [1])) -> (Neq16 x (Const16 <t> [0]))
(Geq8U  x (Const8  <t> [1])) -> (Neq8  x (Const8  <t> [0]))
```

Unfortunately, doing this at the generic level is probably not ideal, since (a) not all architectures have special handling of eq/neq 0, (b) it might interfere with the prove pass.

So the remaining work here is to port these rules to arch-specific rules as applicable, and confirm/disconfirm that they are used and that they are worthwhile.

(Related aside: Why doesn't amd64.rules have rules like `(SETNE (CMPQ x zero:(MOVQconst))) -> (SETNE (TESTQ x x))`?)

cc @martisch @philhofer
Repository: kubernetes
Issue: apiserver errors should include reason
Labels: area/api,area/apiserver,sig/api-machinery,kind/feature,lifecycle/frozen

/kind feature

**What happened**:
Spend too much time figuring out that my apiserver didn't start because the etcd DNS name couldn't be resolved. I got the following error:
```
Error: error waiting for etcd connection: timed out waiting for the condition
```
And even `--v=10` didn't provide any more context. This was very misleading and made me assume the issue is on application level.

**What you expected to happen**:
I expected the apiserver error to tell me that DNS resolution wasn't working.

**How to reproduce it (as minimally and precisely as possible)**:
I used the bootkube manifest but just starting the apiserver with `--etcd-servers` pointing to a nonexisting name.
Repository: javascript
Issue: Support for ESnext Class Feature
Labels: needs eslint rule change/addition

Hello,

Curious if support for [ESnext classes](https://github.com/tc39/proposal-class-fields) is can be expected now that the feature has been [moved from stage-2 to stage-3](https://github.com/tc39/proposal-class-fields/commit/5a4ff5fa4bf30885188279f6fb8070f2e1903c32).

If not, at what point (if any) will this feature be included?

Currently using the work around detailed in https://github.com/airbnb/javascript/issues/589.

Thank you
Repository: kubernetes
Issue: Support on Containerized mounter with customer image
Labels: sig/storage,lifecycle/frozen

"Containerized Mounter" feature #community/pull/589 is work-in-progress. Currently Kuberentes supports a temporary solution for containerized mounter, but only works for NFS and GlusterFS.
#37990 #41944

But based on the current mounter with chroot solution, we can also make other types of mount utitlities work in a quick way. The steps are listed as follows

1. Install the mount binaries in a docker image  (example of Docker file https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/mounter/Dockerfile)
2. Export the docker image to a tar file 
    docker run --name=gcimounter image
    docker export gcimounter > image.tar
3. Upload the image.tar to google cloud (or other places that you can use wget to download it)
4. Run a daemonSet to install the image tar file on each Kuberentes cluster node
Example of daemonSet yaml file https://gist.github.com/jingxu97/9f7ef10d9b915e8701a7294e99367f17

This is a quick-dirty way to set up mounter rootfs with customized image file so that user could have their own version of file system binaries. But we are not trying to fully support this since we are currently working on a more generalized approach for containerized mount.
Repository: vscode
Issue: Toggle the block comment without having to select it
Labels: feature-request,editor-comments

<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. -->

<!-- Use Help > Report Issues to prefill these. -->
- VSCode Version: 1.15.0
- OS Version: windows10



There is a problem that bothers me. **If I want to remove the block comment, I have to select it**, like this:

![](http://oe9d7h5y3.bkt.clouddn.com/select.png)

If I do not select it, and go to toggle block comment, it becomes:

![](http://oe9d7h5y3.bkt.clouddn.com/select2.png)

Have you a good idea to solve it?

**PS**: I use this hot key `ctrl+shift+/` to toggle block comments, which was bound to the command  `editor.action.blockComment`


Reproduces without extensions: Yes
Repository: flutter
Issue: Possible to capture the previous screen before an error
Labels: framework,P2,team-framework,triaged-framework

In relation to https://github.com/flutter/flutter/issues/10695, customer: six is asking if it's possible to capture the previous frame before an error.

That way they could send that screen as part of a feedback report.
Repository: vscode
Issue: [themes] Disable Italic Option Feature Request
Labels: feature-request,themes,accessibility

- VSCode Version: 1.15.0
- OS Version: Windows 10 Version 1703 Build 15063.540

Steps to Reproduce:

1.
2.

Reproduces without extensions: Yes/No

Sometimes authors of themes use italic for `comments`, `language keywords` and for other things. In some cases that's looks not so good (as example what I mean you can read my issue/feature-request on Material Theme https://github.com/equinusocio/vsc-material-theme/issues/81). Of course we can change this in theme source code manually but it will be great to have `Disable Italic Option` in vscode config file.

For example in Sublime Text 3 we have `no_italic` font option to disable italic at all:

```
"font_options":
[
	"no_italic"
],
```

Related issue: https://github.com/Microsoft/vscode/issues/25895

Fira Code don't have Italic too.
Repository: go
Issue: x/mobile/gl: need API to retrieve error from GetAttribLocation()
Labels: mobile

### What version of Go are you using (`go version`)?
$ go version
go version go1.9rc2 linux/amd64

### What operating system and processor architecture are you using (`go env`)?
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/esmarques/go"
GORACE=""
GOROOT="/usr/local/go1.9rc2.linux-amd64"
GOTOOLDIR="/usr/local/go1.9rc2.linux-amd64/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build080353435=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

### What did you do?
Need API to retrieve error from GetAttribLocation().

### What did you expect to see?
GetAttribLocation() returns -1 on error:
https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glGetAttribLocation.xhtml
I would expect to be able to detect the -1 using the API in https://godoc.org/golang.org/x/mobile/gl

### What did you see instead?
GetAttribLocation() currently returns result as Attrib.Value (uint) which can't deliver the error -1.
https://godoc.org/golang.org/x/mobile/gl#Attrib
Repository: go
Issue: .gitignore: Remove cruft and editor/OS-specific ignore files
Labels: NeedsFix

Here's the current contents of the `.gitignore` file for the Go project.

```
.DS_Store
*.[56789ao]
*.a[56789o]
*.so
*.pyc
._*
.nfs.*
[56789a].out
*~
*.orig
*.rej
*.exe
.*.swp
core
*.cgo*.go
*.cgo*.c
_cgo_*
_obj
_test
_testmain.go

/VERSION.cache
/bin/
/build.out
/doc/articles/wiki/*.bin
/goinstall.log
/last-change
/misc/cgo/life/run.out
/misc/cgo/stdio/run.out
/misc/cgo/testso/main
/pkg/
/src/*.*/
/src/cmd/cgo/zdefaultcc.go
/src/cmd/go/internal/cfg/zdefaultcc.go
/src/cmd/go/internal/cfg/zosarch.go
/src/cmd/internal/objabi/zbootstrap.go
/src/go/build/zcgo.go
/src/go/doc/headscan
/src/runtime/internal/sys/zversion.go
/src/unicode/maketables
/test.out
/test/garbage/*.out
/test/pass.out
/test/run.out
/test/times.out

# IntelliJ-based editors
/.idea/
```

Many of those, like `.idea` and `.DS_Store`, are not specific to the Go project - they're specific to a user's environment or to an OS. There are large number of user-specific files that get placed in directories that we might need to exclude; we can't enumerate the list, and it also seems useful to teach users how to solve this problem for themselves.

Git has a tool for dealing with files you'd like to (privately) ignore. You can edit the `.git/info/exclude` file to privately ignore any files you don't want to commit to the project. You can also create a global `.gitignore` file for your computer to ignore those files in every Git repository on your machine, described here: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore.

Finally, you can create a Git template to automatically populate the contents of `.gitignore` whenever a new Git repository is created, as described here: https://stackoverflow.com/a/16658321/329700

I'd like to propose that we put the above instructions in the `.gitignore` file and then remove all of the user and OS-specific ignore directives; the ignore file should only include artifacts that are generated by the Go project that we'd rather not check in.
Repository: vscode
Issue: Add Opacity & Variable Height to Minimap
Labels: feature-request,editor-minimap

I'm looking for a way to change my VSCode Editor Minimap to behave more like the Atom Minimap.

Specifically, to have container opacity and variable height as the file grows in length. The opacity is what is most important to me, but the variable container length would help a lot as well.

Currently, my Atom minimap allows opacity and only grows in length as needed.  
![capture](https://user-images.githubusercontent.com/21133719/29327005-e4b47bee-81aa-11e7-8cd9-52cb6411d8c0.JPG)

While my VSCode minimap covers my code and maintains full pane height no matter how many lines are in the file. 
![capture1](https://user-images.githubusercontent.com/21133719/29327030-f82e16b2-81aa-11e7-8107-07972643f65f.JPG)


I tried asking a question about this on [stackoverflow](https://stackoverflow.com/questions/45685834/vscode-minimap-creating-opacitylimited-height-like-atom-minimap-package) and looking through these issues. So far the closest I've found to this question is issue [#21255](https://github.com/Microsoft/vscode/issues/21255), which points to issue [#21229](https://github.com/Microsoft/vscode/issues/21229) and then to issue [#21359](https://github.com/Microsoft/vscode/issues/21359), which lead to the implementation of a box shadow to make the minimap separation more prominent.

Unfortunately, the box shadow doesn't allow me to recover that text editor width while keeping my minimap enabled. This makes the difference between being able to see all my code using 2 panes and having my code cut off by the minimap.

I'm sure a lot of people transitioning from Atom to VSCode would appreciate being able to maintain this editor workspace, particularly when working with a lot of smaller files.

EDIT:

Adding what information I can in case you consider feature implementation:

Atom uses a gear icon that appears over the minimap on mouseover allows for 'absolute-mode' to be toggled on and off. This option toggles between a VSCode-like minimap and the one I showed above.
![capture3](https://user-images.githubusercontent.com/21133719/29331547-062e4f02-81ba-11e7-89a2-2bdfa4bc8e17.JPG)

From what I understand of the VSCode design paradigm so far, I think a similar feature could be toggled as a User Setting such as `"editor.minimap.absolutePosition": true,`
Repository: flutter
Issue: Flutter templates should support "com.android.library" Gradle plugin
Labels: platform-android,tool,t: gradle,P2,a: plugins,team-android,triaged-android

The generated plugin template `build.gradle` files, and Flutter's `packages/flutter_tools/gradle/flutter.gradle` do not support Android library.

In the `flutter.gradle` file, only `project.android.applicationVariants` are used. Android library does not have this property and instead offers `libraryVariants`.

The problem does not happen to app template, such as the `example/android` in the plugin package.

Fixing this would eliminate all the squiggle lines and missing Flutter imports in Java source.

This is probably related to #11439 and #9698.
Repository: go
Issue: proposal: regexp: Optimize fixed-length patterns
Labels: Performance,Proposal,Proposal-Hold

The `regexp` package has 3 different matchers (NFA, onepass, backtrack). One of them is selected depending on the pattern.

I suggest adding a 4th matcher optimized for fixed-length patterns like `a.ab$` on strings.
I wrote a [proof-of-concept implementation](https://github.com/sylvinus/regexp-bypass) which provides constant-time matching relative to the size of the input string in many cases, whereas the current matchers from `regexp` perform linearly. Performance becomes close to what can be achieved with methods like `strings.Index`.

Here is a sample benchmark result of `regexp.MatchString("a.ab$", strings.Repeat("a", M)+"b")`:

```
M=1000
BenchmarkRegexpBypass/DotSuffix/bypass-8   	30000000	    109 ns/op  # New matcher implementation
BenchmarkRegexpBypass/DotSuffix/std-8      	   50000	  69882 ns/op  # Go's current standard library
BenchmarkRegexpBypass/DotSuffix/pcre-8     	  100000	  41359 ns/op  # PCRE
BenchmarkRegexpBypass/DotSuffix/rust-8     	20000000	    157 ns/op  # Rust regexp engine
```

I've added more details, benchmarks and tests (with fuzzing!) to [the repository](https://github.com/sylvinus/regexp-bypass). Not sure how much should be inlined here.

The obvious cons of this proposal are:

 - Adding more code to the standard library
 - Adding more work at compilation time.

The pros are:

 - Constant-time matching for many simple regexps (relative to the size of the input string)
 - No overhead for regexps that are not supported
 - Go's `regexp` package is usually considered immature performance-wise. This proposal plays a small role in fixing that by adding optimizations that can reasonably be expected from the end-user.
 - This matcher keeps very little state and bypasses the mutex from `regexp.go`
 - There are already 3 different matchers in the standard library (4 with the upcoming DFA), so adding a new one for a specific kind of patterns is not surprising.
 - `regexp.MatchString("(?:png|jpg)$")` could obviously be rewritten as `strings.HasSuffix("png") or strings.HasSuffix("jpg")` but sometimes it is not practical because the pattern to be matched is user-supplied or part of a long list of patterns. Examples include interactive log search or lists of paths in HTTP routers.
 - Limited risk due to exhaustive tests in the standard library and additional fuzzing

Feedback would be highly appreciated. Thanks!!