sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: runtime: annotation for sysAlloced types
Labels: NeedsInvestigation

@randall77 recently found some subtle issues related to write barriers on fields that point from runtime structures allocated from non-GCed (and hence non-scanned) memory to GCed heap memory. I manually audited all non-GCed structures to find any other such pointers, but obviously manual auditing can get out of date.

One possible way to help automate this is to add an annotation on types that are allocated from non-GCed memory. This annotation would disallow pointers to types that do not have this annotation and would disallow calling new on this type (implicit heap allocations are already disallowed in the runtime). It should probably also disallow unsafe.Pointer in annotated types (effectively requiring uintptr instead).

/cc @randall77 @ianlancetaylor @rsc @RLH
Repository: java-design-patterns
Issue: Backends for Frontends pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Backends for Frontends (BFF) design pattern is intended to create separate backend services for different user interfaces or clients. This pattern is particularly useful when different clients (such as mobile apps, desktop applications, and web applications) have distinct needs and require tailored backend interactions. Implementing BFF helps to ensure that each client gets exactly the data it requires in the optimal format, improving performance and maintainability.

**Main Elements of the Pattern:**
1. **Client-Specific Backend:** Each frontend has a dedicated backend service that caters to its specific needs.
2. **Data Aggregation:** The BFF aggregates data from various sources and formats it appropriately for the frontend.
3. **Decoupling:** This pattern decouples the frontend from the complexities of backend systems, providing a clean API tailored to the frontend's requirements.
4. **Optimized API:** Each backend service provides an optimized API for its respective client, improving performance and user experience.

**References:**
- [Backends for Frontends (BFF) Pattern](https://samnewman.io/patterns/architectural/bff/)
- [Microservices Patterns: With examples in Java](https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543)
- [Github Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

**Acceptance Criteria:**
1. **Client-Specific Backend Services:** Implement distinct backend services for at least two different clients (e.g., web and mobile).
2. **Data Aggregation:** Ensure that the BFFs aggregate data from multiple services and format it specifically for their respective clients.
3. **Optimized APIs:** Create clean and optimized APIs for each backend service to improve the performance and user experience of the respective frontends.
Repository: java-design-patterns
Issue: Elm architectural pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Elm design pattern, originating from the Elm language, is a pattern for building web applications that emphasizes simplicity, maintainability, and robustness. It follows the Model-View-Update (MVU) architecture, making state management predictable by using a single, immutable state.

**Main Elements of the Pattern:**
1. **Model:** Represents the state of the application.
2. **View:** A function of the model that returns the HTML representation.
3. **Update:** A function that takes the current state and a message, returning a new state.
4. **Messages:** Dispatched events that trigger state transitions.
5. **Commands:** Side effects such as HTTP requests that do not change the state directly but might produce messages.

**References:**
1. [The Elm Architecture](https://guide.elm-lang.org/architecture/)
2. [Elm Architecture Tutorial](https://github.com/evancz/elm-architecture-tutorial/)

**Acceptance Criteria:**
1. Implement the Model-View-Update architecture with clear separation of concerns.
2. Ensure immutability of the state and the predictability of state transitions.
3. Provide comprehensive unit tests covering all components (Model, View, Update, Messages, and Commands).
Repository: neovim
Issue: Increment and decrement operations truncate big numbers
Labels: bug-vim

Clicking Ctrl+a (increment) or Ctrl+x (decrement number) while cursor is under

```
12016012609141909200527091927191118250205120747
```

will truncate it to 

```
12555055019999496428
```

and 

```
12555055019999496426
```

respectively.
Repository: vscode
Issue: Can I get scope / scopeRange at a position?
Labels: feature-request,api,tokenization

_From @billti on November 1, 2015 6:10_

The API call `document.getWordRangeAtPosition(position)` appears to use its own definition of a word. For example, my tmLanguage defines `attrib-name` as a token/scope, yet `getWordRangeAtPosition` appears to break this into 2 words on the `-` character.

How can I get token ranges at a position based on my custom syntax? (And it would be really useful if I could get the scope name that goes along with it too).

_Copied from original issue: Microsoft/vscode-extensionbuilders#76_
Repository: vscode
Issue: Support autoClosingPairs for strings like `begin` and `end`
Labels: feature-request,editor-autoclosing

_From @Wosi on October 27, 2015 20:23_

I'd like to define `autoClosingPairs` for Pascal like `begin <-> end`, `if <-> then` etc.
Definitions for closing pairs like these seem to be ignored by VSCode. It looks like auto closing is currently supported for character pairs only. 

Please add support for longer auto closing pairs.

_Copied from original issue: Microsoft/vscode-extensionbuilders#66_
Repository: vscode
Issue: Link to a file position in Output Channel
Labels: feature-request,output

_From @ArtemGovorov on October 19, 2015 2:0_

As mentioned in [this issue](https://github.com/Microsoft/vscode-extensionbuilders/issues/19#issuecomment-148695187), output channel supports link rendering. I'd like to append a link to a workspace file position (by providing a file name, line and column in some form). If it's already possible, could you please paste an example on how to do it?

_Copied from original issue: Microsoft/vscode-extensionbuilders#41_
Repository: angular
Issue: Implement @ObserveChildren or similar API
Labels: feature,hotlist: components team,area: core,core: queries,design complexity: major,feature: under consideration

Previously discussed with @vsavkin and @jeffbcross 

Background - programmatically listening to events propagated by children is difficult currently. 

Consider: 
You have a `<accordion>` component and n `<accordion-item>` components:

```
<accordion>
  <accordion-item></accordion-item>
  <accordion-item></accordion-item>
  <accordion-item></accordion-item>
</accordion>
```

An accordion-item component might emit a `select` event/output, used to set it as the currently active item.

Currently the best way to achieve this is the accordion-item component would inject the parent accordion, and have the accordion-item register itself with the parent, and call a method to close the others

``` typescript
@Component({selector: 'accordion' })
class Accordion {
  _items: []AccordionItem = [];
  register(item: AccordionItem){
    this._items.push(item);
  }
  toggleActive(selectedItem:AccordionItem){
    this._items.forEach(item => {
      if(item !== selectedItem){
        item.active = false;
      }
    });
    selectedItem.active = true;
  }
}

@Component({selector: 'accordion-item' , inputs: ['active'] })
class AccordionItem {
  active: boolean;
  constructor(private accordion: Accordion){
    accordion.register(this);
  }
  setActive(){
    this.accordion.toggleActive(this);
  }
}
```

Ideally, a child component would simply expose a 'select' event:

``` typescript
@Component({selector: 'accordion-item' })
class AccordionItem {
  @Input() active: boolean;
  @Output selected:EventEmitter<AccordionItem> = new EventEmitter();
  active: boolean;
  setActive(){
    this.selected.emit(this);
  }
}
```

The parent accordion can currently easily get ahold of the children via `@ViewChildren()` (or whatever) but there is a not a clean way to listen to events emitted from the children. 

Proposed Syntax:

Implement a `@ObserveChildren` decorator (or similar) that would enable Observation of events emitted by child components:

``` typescript
@Component({selector: 'accordion' })
class Accordion {
  //specify type and desired output to Observe.
  @ObserveChildren(AccordionItem, 'select') childSelections: Observable<AccordionItem>
  @ViewChildren(AccordionItem) children: Observable<AccordionItem>
  afterViewInit(){
    this.updates = Observable
      .combineLatest(this.children, this.childSelections, (children, selected) => ({children, selected}))
      .do(({children, selected) => children.map(child => { //update state }))
      .subscribe();
  }
  onDestroy(){
    this.updates.unsubscribe();
  }
}
```

cc @pkozlowski-opensource @Foxandxss
Repository: rust
Issue: Mutable references as function arguments generate inefficient code in trivial cases
Labels: A-LLVM,I-slow,C-enhancement,A-codegen,T-compiler

``` rust
#![crate_type = "lib"]

#[no_mangle]
pub fn good1(x: &mut bool) {
    *x = *x;
}

#[no_mangle]
pub fn good2(x: &mut bool) {
    if *x {
        *x = *x;
    } else {
        *x = *x;
    }
}

#[no_mangle]
pub fn good3(x: &mut bool) {
    let mut y = *x;

    if y {
        y = y;
    }

    *x = y;
}

#[no_mangle]
pub fn good4(x: &mut bool) {
    let mut y = *x;

    if y {
        y = false;
        y = true;
    }

    *x = y;
}

#[no_mangle]
pub fn bad1(x: &mut bool) {
    if *x {
        *x = *x;
    }
}

#[no_mangle]
pub fn bad2(x: &mut bool) {
    if *x {
        *x = false;
        *x = true;
    }
}

#[no_mangle]
pub fn bad3(x: &mut bool) {
    if !*x {
        *x = *x;
    }
}
```

```
good1:
    retq

good2:
    retq

good3:
    retq

good4:
    retq

bad1:
    cmpb    $0, (%rdi)
    je  .LBB4_2
    movb    $1, (%rdi)
.LBB4_2:
    retq

bad2:
    cmpb    $0, (%rdi)
    je  .LBB5_2
    movb    $1, (%rdi)
.LBB5_2:
    retq

bad3:
    cmpb    $0, (%rdi)
    jne .LBB6_2
    movb    $0, (%rdi)
.LBB6_2:
    retq
```
Repository: go
Issue: tour: link to more resources throughout all content
Labels: NeedsInvestigation

Context: https://tour.golang.org/concurrency/5

It would be very useful to have a "Would you like to know more?" link in the description to the documentation, in this case https://golang.org/ref/spec#Select_statements
Repository: youtube-dl
Issue: Add support for bosrtv.nl
Labels: site-support-request

http://bosrtv.nl/televisie/....

youtube-dl http://bosrtv.nl/televisie/in-het-spoor-van-nichiren
[generic] in-het-spoor-van-nichiren: Requesting header
WARNING: Falling back on generic information extractor.
[generic] in-het-spoor-van-nichiren: Downloading webpage
[generic] in-het-spoor-van-nichiren: Extracting information
ERROR: Unsupported URL: http://bosrtv.nl/televisie/in-het-spoor-van-nichiren; please report this issue on https://yt-dl.org/bug .
Repository: java-design-patterns
Issue: Presentation-Abstraction-Control pattern
Labels: info: help wanted,epic: pattern,type: feature

## Description:
The Presentation-Abstraction-Control (PAC) is a design pattern used in software architecture that focuses on the separation of concerns into three interconnected components:
1. **Presentation:** Manages the user interface and user interactions.
2. **Abstraction:** Encapsulates the business logic and data management.
3. **Control:** Mediates the interaction between the presentation and abstraction layers.

### Main Elements of the Pattern:
- **Presentation:** Handles the graphical or textual representation of the application and the user inputs.
- **Abstraction:** Contains the core functionality and business logic.
- **Control:** Acts as an intermediary, coordinating the flow of data and commands between the presentation and abstraction layers.

### References:
- [Presentation-Abstraction-Control Pattern](https://en.wikipedia.org/wiki/Presentation–abstraction–control)
- [MVC vs PAC](http://www.garfieldtech.com/blog/mvc-vs-pac)

### Acceptance Criteria:
1. Implement a basic example of the PAC design pattern with clear separation between Presentation, Abstraction, and Control components.
2. Ensure the code follows the project contribution guidelines as outlined in the [Java Design Patterns Wiki](https://github.com/iluwatar/java-design-patterns/wiki).
3. Provide comprehensive documentation and unit tests for the implemented pattern, demonstrating its functionality and interactions between components.
Repository: youtube-dl
Issue: --flat-playlist doesn't also work with --get-url or --get-title or other --get- features
Labels: request

Maybe this is a wishlist bug: it would be great if --flat-playlist worked with --get-url or --get-title or other --get- features to allow users to get reports about the content of playlists. Supporting --get-duration for flat-playlists would be cool because then you would know how many hours of video you are about to download.
Repository: go
Issue: encoding/xml: fix name spaces
Labels: NeedsFix,early-in-cycle

There are many pending issues related to the handling of xml name spaces. We need to rethink this. One more try and then we're going to give up.
- #7535 encoding/xml: Encoder duplicates namespace tags
- #11496    encoding/xml: Serializing XML with namespace prefix
- #9775 encoding/xml: Unmarshal does not properly handle NCName in XML namespaces
- #12624    encoding/xml: brittle support for matching a namespace by identifier or url
- #8167 encoding/xml: disallow attributes named xmlns:*
- #11735    encoding/xml: empty namespace conventions are badly documented
- #8068 encoding/xml: empty namespace prefix definitions should be illegal
- #8535 encoding/xml: failure to handle conflicting tags in different namespaces
- #11431    encoding/xml: loss of xmlns= in encoding since Go 1.4
- #7113 encoding/xml: missing nested namespace not handled
- #11724    encoding/xml: namespaced and non-namespaced attributes conflict
- #7233 encoding/xml: omit parent tags if value is empty #2
- #12406    encoding/xml: support QName values / expose namespace bindings
- #9519 encoding/xml: support for XML namespace prefixes
Repository: youtube-dl
Issue: Site request: www.sdarot.pm
Labels: site-support-request

This is an Israeli TV streaming site.

Example season URL:
http://www.sdarot.pm/watch/1004-%D7%94%D7%99%D7%A9%D7%A8%D7%93%D7%95%D7%AA-%D7%99%D7%A9%D7%A8%D7%90%D7%9C-survivor-israel/season/7

Normally each episode requires a 30 second wait before viewing link becomes active.
Repository: vscode
Issue: Native node modules from extensions
Labels: feature-request,extensions

I’m looking to build an extension but one of the packages I need to depend on is a native module. When I do an `npm install` it installs the package just fine, I can launch a node shell and interact with it, etc. But when I go to use the package from within my plugin I get an error as it’s trying to load the ia32 build of the native module not the x64 which was compiled by node-gyp.

A quick bit of debugging indicates that the problem stems by `process.arch` returning `ia32` when running in VS Code when my machine is a x64 machine (Win10 x64).

So is there some way to either:
- Have VS Code run an x64 process
- Have VS Code’s ia32 process do my npm restore (and subsequent compile with node-gyp)

Otherwise I fear that my extension might be dead in the water :frowning:
Repository: go
Issue: go/printer: consider permitting one-line "enum" const decls
Labels: NeedsDecision

A declaration of the form:

```
const (
    Do = iota; Re; Mi; Fa; Sol; La; Ti;
)
```

gets formatted as:

```
const (
    Do = iota
    Re
    Mi
    Fa
    Sol
    La
    Ti
)
```

The former is close to what in other languages might be achieved with an "enum" declaration. If there's several such simple const decls, the latter form uses undue amount of space w/o much readability benefit.

Consider recognizing this special case and not introduce line-breaks if there were none in the original source.
Repository: You-Dont-Know-JS
Issue: Async & Performance - ch6 - Calculation error
Labels: for second edition,errata

In the **Chapter 6**, under **Context Is King** we can read:

> You could claim that Y is 20% slower than X,...

Three paragraphs after, one operation of X is estimated to take 100ns and a Y operation one to 80ns. If a Y operation is slower than a X operation by 20%, it should take 120ns to be done and not 80ns.

``` diff
- If X takes 100ns, and Y takes 80ns, the difference is 20ns…
+ If X takes 100ns, and Y takes 120ns, the difference is 20ns…
```
Repository: youtube-dl
Issue: Support for Het Nieuwsblad
Labels: site-support-request

- **URL:** http://www.nieuwsblad.be/cnt/dmf20151124_01986463
- **Error:** Unsupported URL: http://www.nieuwsblad.be/cnt/dmf20151124_01986463
- **Platform:** openSUSE 13.1, x86_64, XFCE
- **Version:** 2015.11.24
- **Video player:** VRT Player (custom?)

```
sven@linux-etoq:/mnt/storage2/archive> ytdl -v http://www.nieuwsblad.be/cnt/dmf20151124_01986463
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--title', u'--continue', u'--retries', u'4', u'--write-info-json', u'--write-description', u'--write-thumbnail', u'--write-annotations', u'--all-subs', u'--ignore-errors', u'--merge-output-format', u'mkv', u'-f', u'bestvideo+bestaudio/best', u'-v', u'http://www.nieuwsblad.be/cnt/dmf20151124_01986463']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2015.11.24
[debug] Python version 2.7.6 - Linux-3.11.10-29-desktop-x86_64-with-SuSE-13.1-x86_64
[debug] exe versions: ffmpeg 2.8.2, ffprobe 2.8.2, rtmpdump 2.4
[debug] Proxy map: {}
[generic] dmf20151124_01986463: Requesting header
WARNING: Falling back on generic information extractor.
[generic] dmf20151124_01986463: Downloading webpage
[generic] dmf20151124_01986463: Extracting information
ERROR: Unsupported URL: http://www.nieuwsblad.be/cnt/dmf20151124_01986463
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 1282, in _real_extract
    doc = compat_etree_fromstring(webpage.encode('utf-8'))
  File "/usr/lib/python2.7/site-packages/youtube_dl/compat.py", line 248, in compat_etree_fromstring
    doc = _XML(text, parser=etree.XMLParser(target=etree.TreeBuilder(element_factory=_element_factory)))
  File "/usr/lib/python2.7/site-packages/youtube_dl/compat.py", line 237, in _XML
    parser.feed(text)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: syntax error: line 3, column 0
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 663, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 290, in extract
    return self._real_extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/generic.py", line 1887, in _real_extract
    raise UnsupportedError(url)
UnsupportedError: Unsupported URL: http://www.nieuwsblad.be/cnt/dmf20151124_01986463
```
Repository: rust
Issue: Codegen for a large static array uses a lot of memory
Labels: A-LLVM,C-enhancement,T-compiler,I-compilemem

Following 2 lines of Rust code can use more than 200 MB of memory to compile.

``` rust
const L: usize = 1 << 25;
pub static S: [u32; L] = [1; L];
```

```
$ rustc --crate-type lib -Z time-passes test.rs | grep translation
time: 0.710; rss: 209MB translation
```

Reported on [users.rust-lang.org post](https://users.rust-lang.org/t/memory-leak-of-rustc/3781). See also #23600.
Repository: vscode
Issue: Hide empty folders after apply file exclusions (user settings)
Labels: feature-request,file-explorer

I'm a Unity 3D developer. Although I use file exclusions, it would be nice to hide folder that get empty after file exclusions are applied.
Repository: neovim
Issue: quickfix: Relative/absolute filenames mess
Labels: bug-vim,quickfix

vim/neovim names its file buffers according to the path passed to `:e`. When the passed path is relative the buffer name becomes relative, when it's absolute the buffer name becomes absolute. But then `:cd X` and `:lcd X` rename the buffers to become absolute if outside X, otherwise relative. Even worse: an `:lcd` in any window will also update names for other windows (indeed, this is the reason my hack -see below- works).

This behavior is not consistent and thus confusing: sometimes absolute means outside the current working directory, sometimes not. For quickfix, which parses the output of external command, this often implies that files in the current directory are shown with absolute paths (in case the external command happens to report the full path). I would go to say the behavior is wrong.

This was discussed a time ago in vim mailing list but never really addressed:   

https://groups.google.com/forum/#!topic/vim_use/Vq0z2DJH2So

(And see my awful workaround at the end: `0split | lcd . | quit`, I would like to remove it from my config for good!)

There are two issues described there:
- [ ] Consistently set buffer names on creation. The obvious rule is: relative if inside current working directory, otherwise absolute.
- [ ] It would be nice if `getcwd()` could specify whether the desired cwd is the local or the global one.
Repository: java-design-patterns
Issue: Staged Event Driven Architecture (SEDA)
Labels: info: help wanted,epic: pattern,type: feature

### Description
The Staged Event-Driven Architecture (SEDA) is a design pattern used to manage the complexity of highly concurrent systems. It divides the processing of events into a series of stages connected by queues, allowing for more manageable concurrency and better isolation of different parts of the system. Each stage can be thought of as a pipeline segment that processes events and then hands them off to the next stage. This pattern improves scalability, fault tolerance, and performance.

**Main Elements of the Pattern:**
1. **Stages:** Individual units of processing that handle specific tasks. Each stage is isolated from others and communicates through events.
2. **Event Queues:** Buffers that connect stages, allowing asynchronous communication between them. These queues help decouple the stages, improving system resilience.
3. **Thread Pools:** Each stage can have its own thread pool to process events concurrently, providing fine-grained control over resource allocation.
4. **Event Flow Control:** Mechanisms to regulate the flow of events through the stages, preventing bottlenecks and ensuring smooth operation.

### References
- [Staged Event-Driven Architecture (SEDA) - Wikipedia](https://en.wikipedia.org/wiki/Staged_event-driven_architecture)
- [What is SEDA (Staged Event Driven Architecture)?](https://stackoverflow.com/questions/3570610/what-is-seda-staged-event-driven-architecture)

### Acceptance Criteria
1. Implement the basic structure of the SEDA pattern, including stages, event queues, and thread pools.
2. Demonstrate a simple use case that showcases how events flow through multiple stages.
3. Ensure the implementation adheres to the project contribution guidelines, including proper documentation and unit tests.
Repository: vscode
Issue: Provide encoding-related APIs for editor extensions
Labels: feature-request,api,file-encoding

Currently there are only two fields in the TextEditorOptions API, a few other TextEditor-related APIs, and none of them is able to deal with the text buffer's encoding.
Comparing to [Atom's TextEdit API](https://atom.io/docs/api/v1.2.4/TextEditor), that is far from enough.

Most importantly, the API limitation makes it (seems) impossible for vscode-editorconfig to implement features like `charset` support, which is a crucial need for many people.