sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: three.js
Issue: ImmersiveControls
Labels: Enhancement

Making a good immersive VR controls module is long and complex, because of the many basic cases to cover : 
- no immersion ( mouse/keyboard preview before immersion )
- immersion but no controller
- one controller ( right/left )
- two controllers
- hands controls

This is an issue because : 
- It might discourage people from going into VR development with three.js.
- It's a lot of code if you only want to make a quick demo ( for showcases, bug reports, experiments... ).
- Handling events, raycasting and intersections with all the above-mentioned cases in a consistent way is complex.
- Everybody make their own makeshift imperfect solution, which is suboptimal

I found myself creating a "VRControls" module on my first VR project, and re-used it ever since, improving it now and then...  and I'm sure everyone using three.js for VR do the same thing ( not suggesting to use mine, it's unsuitable ). I think it would be beneficial for everybody if we had a community tool for this, **a new controls module in the exemples**.

**Example API :** 

```javascript
import { ImmersiveControls } from 'three/examples/jsm/controls/ImmersiveControls.js';

const controls = new ImmersiveControls( camera, domElement );

controls.addEventListener( 'click', (e) => {

	e.origin; // 'mouse', 'right-controller', 'left-hand'...

	// cast a ray either from the camera or the controller(s)
	const intersects = controls.intersectObjects( scene.children );

});

controls.addEventListener( 'move', (e) => {

        // intersect bounding sphere(s) at controller(s) or hand joint(s) position
	if ( controls.intersectsPlane( plane ) ) {

		console.log( `then ${ e.origin } is intersecting the plane` )

	}

});
```

See how life would be easier : the three.js user would not _have to_ care about what is the current state of immersion. They would just listen to standard events and do intersection tests from a higher-level API. It would make for a more standard and healthy code.

Of course this would not fit every case of every VR project, but most of the time it would be enough, and it would definitely help people hit the ground running.

If there is interest for this I'm willing to work on a PR ( or to let somebody more capable do it 😉 ) after discussing the scope and API.
Repository: rust
Issue: Programs with `#![no_std]` produce incorrect unused import warnings
Labels: A-lints,T-compiler,C-bug

Originally found here: https://twitter.com/khyperia/status/1346902124806942730

`a/src/lib.rs`:
```rust
pub trait Ext {
    fn sin(self) -> Self;
}
impl Ext for f32 {
    fn sin(self) -> Self { 0.0 }
}
```
`b/src/lib.rs`:
```rust
#![no_std]
use a::Ext;
pub fn func() -> f32 {
    1.0f32.sin()
}
```

**Note the lack of `#![no_std]` in `a/src/lib.rs`**

<details>
  <summary>both `a` and `b` are typical crates, created with this (click to expand)</summary>

```
rusttest> mkdir a
rusttest> cd a
rusttest/a> cargo init --vcs none --lib
     Created library package
rusttest/a> mkdir ../b
rusttest/a> cd ../b
rusttest/b> cargo init --vcs none --lib
     Created library package
rusttest/b> nvim Cargo.toml
...
[dependencies]
a = { path = "../a" }
```
</details>

I expected to see this happen: Because crate `b` is `#![no_std]`, `f32::sin()` does not exist (it only exists in `std`). So, it needs `a::Ext::sin()` to be imported. I expect the code to compile without warnings.

Instead, this happened: An **unused import warning** is reported on `use a::Ext;`. This is incorrect, deleting the `use` cases a compilation failure with `no method named sin() found` (as it should).

### Meta

`rustc --version --verbose`:
```
rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-pc-windows-msvc
release: 1.48.0
LLVM version: 11.0
```
`rustc +nightly --version --verbose`:
```
rustc 1.50.0-nightly (1c389ffef 2020-11-24)
binary: rustc
commit-hash: 1c389ffeff814726dec325f0f2b0c99107df2673
commit-date: 2020-11-24
host: x86_64-pc-windows-msvc
release: 1.50.0-nightly
```
(reproduces on both nightly and stable, although I haven't updated in a while...)

---

This may be related to some issues @bitshifter was seeing in [glam](https://github.com/bitshifter/glam-rs), so pinging them if they'd like to follow this, as well as embark on rust-gpu (which I'm on).

Context here is that we want methods like `sin()` and all the other "advanced" math methods on `f32` in `no_std` programs, which are not available, so we're resorting to [rust libm](https://github.com/rust-lang/libm) and extension traits (and `num-traits` serves that need as a glorified extension trait that calls through to `libm`). This warning pops up all the time and it's really frustrating to try and figure out what's happening and why.
Repository: next.js
Issue: Misleading "next-head-count is missing" error for invalid head tags
Labels: good first issue,Linting,Metadata

**What version of Next.js are you using?**

10.0.5

**What version of Node.js are you using?**

12.20.1

**What browser are you using?**

Chrome

**What operating system are you using?**

macOS

**How are you deploying your application?**

Vercel

**Describe the Bug**

When using an unsupported/invalid tag in `next/head`, the console shows an unhelpful `next-head-count is missing` error and the content of `next/head` ends up in the `body` tag.

Example:

```
<Head>
  {/* The following line causes an error */}
  <html lang="en" />
  <title>Demo Page</title>
</Head>
```

**Expected Behavior**

Next.js should warn about the offending tag and gracefully ignore it.

**To Reproduce**

https://github.com/aengl/next-head-count-missing

Check out the project, run it via `yarn dev` and check the console output on the index page to see the error. Check the inspector to verify that the `title` tag was written into the HTML body.

Remove line 6 in `components/SEO.tsx` and the error will disappear:
```
<html lang="en" />
```

More extensive discussion of this error can be found here: https://github.com/vercel/next.js/issues/19361
Repository: pytorch
Issue: running a job on multiple gpus with qsub 
Labels: oncall: distributed,triaged

Hi
I would like to run a scirpt on multiple gpus with a qsub job submission, using torch.distributed command, I am not sure how to do this with qsub, when the gpus are in different machines, could you provide me with some initial script for this? thanks 

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @neerajprad @alicanb @vishwakftw @nikitaved
Repository: flutter
Issue: Landscape Orientation is Wrong Way on iOS
Labels: platform-ios,framework,engine,a: layout,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-ios,triaged-ios

### [`DeviceOrientation.landscapeLeft`](https://api.flutter.dev/flutter/services/DeviceOrientation-class.html#landscapeLeft)

>The orientation that is 90 degrees **clockwise** from portraitUp.

## Steps to Reproduce

1. Run `SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft])` anywhere in your Flutter app.
2. Repeat this on Android and iOS.

**Expected results:** the screen should rotate 90º clockwise on iOS.

**Actual results:** the screen rotates 90º counter-clockwise on iOS. On Android, however, it **does** rotate 90º clockwise.

## Doctor

```
Flutter 1.22.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7891006299 (4 weeks ago) • 2020-12-10 11:54:40 -0800
Engine • revision ae90085a84
Tools • Dart 2.10.4
```
Repository: rust
Issue: `#[allow(dead_code)]` ignores warnings for other items too
Labels: A-lints,C-bug

I believe this should give a warning for `hello`, but it does not:

```rust
fn hello() {}

#[allow(dead_code)]
fn goodbye() { hello() }
```

([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ce0a955bca31b26ee17a299a5079eb71))

Errors:

```
   Compiling playground v0.0.1 (/playground)
    Finished dev [unoptimized + debuginfo] target(s) in 1.64s
```
Repository: godot
Issue: Internal Script Error - opcode #12 accessing enum
Labels: bug,topic:gdscript

**Godot version:**
Godot 3.2.3, Windows 64-bit


**OS/device including version:**
Windows 10 Pro, version 20H2 


**Issue description:**
When attempting to run the project, I get an internal script error when I attempt to compare an int parameter to an enum:

![image](https://user-images.githubusercontent.com/77210861/104108209-6648a980-5288-11eb-977f-173dcedcaabf.png)

![image](https://user-images.githubusercontent.com/77210861/104108213-73659880-5288-11eb-836d-5366ad4d6fdc.png)

![image](https://user-images.githubusercontent.com/77210861/104108227-824c4b00-5288-11eb-8780-32f6961de74f.png)

Apologies if I'm just doing something wrong - the error message said to report, though, so I figured I'd do that.


**Steps to reproduce:**
Run the included project.
The debugger should break on `TerrainData.gd:19`

**Minimal reproduction project:**
[InternalScriptErrorOpcode12.zip](https://github.com/godotengine/godot/files/5791797/InternalScriptErrorOpcode12.zip)

~~Can also find the project here, it's very nascent and should hopefully be relatively straightforward to browse through. . .: https://github.com/jcsato/Bunker-Godot~~ (Repo is now private, if anyone looks at this and finds the minimal project is insufficient let me know, but I'm guessing this issue will probably be closed since we're on Godot 3.4 now)
Repository: godot
Issue: `null` remains in the array after changing an exported property type from Array to int
Labels: bug,topic:editor

**Godot version:**
3.2.3
**OS/device including version:**
Windows10 pro
gtx1050 
GLES3
**Issue description:**
When I change the exported array to an int after it has a null in it
The Inspector changes from null to 0, but the array is still null.
I can fix it by rebuilding it, but I couldn't figure out why for a while.

[Array_Test.zip](https://github.com/godotengine/godot/files/5791801/Array_Test.zip)
Repository: godot
Issue: [Bullet] KinematicBody3D with move_and_slide() can stop moving completely even when the given velocity is not equal to zero
Labels: bug,topic:physics

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->

- Godot 3.2.4 beta 5


**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->

- Windows 10 Home 64-bit, Version 20H2, OS build 19042.685
- Intel® UHD Graphics 620, Version 27.20.100.9126


**Issue description:**
<!-- What happened, and what was expected. -->
I move a KinematicBody3D with velocity input to the move_and_slide() using the Bullet/default physics engine. But after a while, the KinematicBody3D stop moving completely even though the given velocity is not equal to zero, as shown in my screen recording below:

https://user-images.githubusercontent.com/1403194/104109159-d4519880-52a9-11eb-897c-97f6372b402d.mp4

And when I checked the is_on_floor() output, it did not always return true even though the KinematicBody3D was always on the floor with the gravity applied to it on every physics frame, as shown in my screen recording below:


https://user-images.githubusercontent.com/1403194/104109200-5215a400-52aa-11eb-850e-e9b1d01f1b8d.mp4

I am not sure whether this issue is related to #33833 in some way.


**Steps to reproduce:**

1. Open the reproduction project.
2. Choose the appropriate Vector 3 Print in the Player's script available at the inspector tab. 
3. Run the project, the Player will stop moving entirely.


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[test.zip](https://github.com/godotengine/godot/files/5791879/test.zip)
Repository: TypeScript
Issue: Compilation error when mixing promise and non promise types in promise.then's onfulfilled return type
Labels: Needs Investigation,Fix Available,Rescheduled

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms
typescript compilation error on mix promise and non promise type in promise context
<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?
4.1 but is present in oldest version on the online playground (3.3.3333333 as time of writing).
"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about ???

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.2.0-dev.20210108&ssl=3&ssc=45&pln=1&pc=1#code/AoJw9gtglgzgpgOhHGYA2A3OAKALiAVzgEoAoASAVwAs4A7bZGAtXAAgF4A+Npl9gGQC2oSLERN0WbACJaaNGBnEylGvWyoIcGlDoBzTjwDGYOqjSJF+zZB3U9+lQG4gA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
Promise.resolve(true)
	.then(result => result && Promise.resolve("hello"))
	.then(something => console.log(something));
```

### 🙁 Actual behavior
Got a compilation error:
```
    Argument of type '(result: boolean) => false | Promise<string>' is not assignable to parameter of type '(value: boolean) => string | PromiseLike<string>'. Type 'false | Promise<string>' is not assignable to type 'string | PromiseLike<string>'. Type 'boolean' is not assignable to type 'string | PromiseLike<string>'.
```
And `something` was inferred as `boolean`.
<!-- What happened, and why it was wrong -->

### 🙂 Expected behavior
No compilation error and `something` should have been inferred as `boolean | string`.

<!-- What you expected to happen instead, and why -->
Repository: go
Issue: proposal: container: add weak reference maps
Labels: Proposal

This is an outgrowth of #32779, and also of https://mdlayher.com/blog/unsafe-string-interning-in-go/ and ensuing discussion of this on Gopher Slack.

Occasionally, it would be desireable to have weak references. Unfortunately, you can't implement these as a user; you need hooks into the runtime to make a safe weak reference implementation, I think. The string interning hack described above probably works but is not complying with the uintptr conversion rules.

In nearly every case where weak references are desireable, it's desireable to be able to look up specific weak references, which suggests something similar to a map data type. It's also desireable to be able to find out whether the weak reference exists, or to be able to request the reference, getting an actual stable non-weak reference back, without a separation between the query and the retrieval.

Conveniently, a map with a pointer key type already provides exactly this behavior. What it doesn't provide is the potential for GC to remove objects.

Thus, my proposal:

```cache := make(weak map[string]*Data)```

This is equivalent to `make(map[string]*Data)`, except that things which are in the map but not referenced anywhere else may become deleted from the map at any arbitrary time. However, retrieval from the map is guaranteed to either yield a nil (and a false in the ,ok form) or the pointer last stored for that key, and if it yields a non-nil pointer, that pointer is safe to use.

The internal implementation details aren't 100% obvious to me. You could nearly do it with SetFinalizer, except you need a way to ensure that this doesn't clash with any other finalizers used on the item. (For instance, the same value could be present in *two* weak maps...)

I'm not totally sure about the syntax, but I'm pretty sure that this wouldn't compile now under any possible circumstances, so it doesn't break any existing code.

Why not `sync.WeakMap`, parallel to sync.Map and/or sync.Pool? Because type safety is nice, and because the ability to use *or not use* the ", ok" form of retrieval seems desireable. Plain old maps are easier and friendlier to use, and less error-prone.

That said, `sync.WeakMap`, which would vaguely combine the behaviors of sync.Map and sync.Pool, would be viable too. The main issue this is intended to address is that "would like to keep this if it's convenient and/or if it's being used, but don't need to retain it if there's memory pressure" seems like a common use case.
Repository: youtube-dl
Issue: Add separate template for Documentation pull requests and issues
Labels: request

There needs to be a separate template for Documentation pull requests.
The [current one](https://github.com/ytdl-org/youtube-dl/pull/27734#issue-552032574) is for python code pull requests and not appropriate for Documentation
pull requests.

Likewise, https://github.com/ytdl-org/youtube-dl/issues/new/choose needs an
additional category and template: Documentation issues.
Compare: https://github.com/Perl/perl5/issues/new/choose .
Repository: pytorch
Issue: torch.Tensor.random_ is divergent from NumPy's np.random.random
Labels: triaged,module: numpy,module: random,module: deprecation

[torch.Tensor.random_](https://pytorch.org/docs/master/tensors.html?highlight=random_#torch.Tensor.random_) is divergent from NumPy's [np.random.random](https://numpy.org/doc/stable/reference/random/generated/numpy.random.random.html?highlight=random#numpy.random.random), which is an alias for [np.random.random_sample](https://numpy.org/doc/stable/reference/random/generated/numpy.random.random_sample.html#numpy.random.random_sample). 

In short, PyTorch's torch.Tensor.random_ returns values of different dtypes from a dtype-dependent range, while NumPy's random.random_sample returns elements in the [0, 1) interval. 

NumPy's np.random.random is a [Top 50 NumPy function](https://github.com/Quansight-Labs/python-api-inspect/blob/master/data/csv/numpy-summary.csv), and np.random.random_sample is a Top 200 NumPy function. torch.Tensor.random_ is used but does not appear very popular, with fewer than 100 uses within Facebook.

This issue was first reported in https://github.com/pytorch/pytorch/issues/1875.

cc @mruberry @rgommers @heitorschueroff @pbelevich
Repository: pytorch
Issue: Function Request: scipy.stats.pearsonr
Labels: triaged,module: numpy,function request

A request for a function like SciPy's [scipy.stats.pearsonr](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html) to be added to PyTorch.

Originally requested https://github.com/pytorch/pytorch/issues/1254.

cc @mruberry @rgommers @heitorschueroff
Repository: node
Issue: http2 stream.end error
Labels: http2



* **Version**: 15.5.1
* **Platform**: Darwin MacBook-Pro.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64

### What steps will reproduce the bug?
```js
// index.mjs

import http2 from 'http2'
import fs from 'fs'

const server = http2.createSecureServer({
  key: fs.readFileSync('localhost-privkey.pem'),
  cert: fs.readFileSync('localhost-cert.pem')
})

server.on('error', (err) => console.error(err))

server.on('stream', (stream, headers, flags) => {
  stream.end('qweqwe ds sdoapskd okqdoeik woik ed'.repeat(80), err => {
    if (err) {
      console.error(err) // always shows error on each request
      return
    }
    console.log('qweqwe')
  })
});

server.listen(8444) // https://localhost:8444
```

```
Error [ERR_STREAM_DESTROYED]: Cannot call end after a stream was destroyed
    at new NodeError (node:internal/errors:278:15)
    at errorBuffer (node:internal/streams/writable:527:14)
    at afterWrite (node:internal/streams/writable:507:5)
    at onwrite (node:internal/streams/writable:483:7)
    at done (node:internal/http2/core:2081:7)
    at WriteWrap.writeCallback [as callback] (node:internal/http2/core:2086:7)
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:89:12) {
  code: 'ERR_STREAM_DESTROYED'
}
```

### What is the expected behavior?
Works without errors

### What do you see instead?
Always shows errors on each response in stream.end callback
Repository: pytorch
Issue: Function Request: np.interp
Labels: triaged,module: numpy,function request,module: interpolation

An implementation of NumPy's [np.interp](https://numpy.org/doc/stable/reference/generated/numpy.interp.html?highlight=interp#numpy.interp). 

This was first requested on https://github.com/pytorch/pytorch/issues/1552.

cc @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: Function Request: scipy.interpolate.interp1d
Labels: triaged,module: numpy,function request,module: interpolation

A request to implement SciPy's [scipy.interpolate.interp1d](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html) in PyTorch.

Originally requested here: https://github.com/pytorch/pytorch/issues/1552.



cc @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: Function Request: scipy.ndimage.zoom
Labels: triaged,module: numpy,function request,module: interpolation

A request to implement SciPy's [scipy.ndimage.zoom](https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.zoom.html).

First requested in https://github.com/pytorch/pytorch/issues/1552.

cc @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: Function request: scipy.interpolate.RectBivariateSpline
Labels: triaged,module: numpy,function request,module: interpolation

A request to implement SciPy's [scipy.interpolate.RectBivariateSpline](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RectBivariateSpline.html).

Originally requested in https://github.com/pytorch/pytorch/issues/1552.

cc @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: Function request: scipy.interpolate.RegularGridInterpolator
Labels: triaged,module: numpy,function request,module: interpolation

A request for SciPy's [scipy.interpolate.RegularGridInterpolator](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RegularGridInterpolator.html?highlight=regulargrid#scipy.interpolate.RegularGridInterpolator).

Originally requested in https://github.com/pytorch/pytorch/issues/1552.

cc @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: Function request: scipy.interpolate.griddata
Labels: triaged,module: numpy,function request,module: interpolation

A request for SciPy's [scipy.interpolate.griddata](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html?highlight=griddata#scipy.interpolate.griddata).

Originally requested in https://github.com/pytorch/pytorch/issues/1552.

cc @mruberry @rgommers @heitorschueroff