profile
viewpoint
Björn Steinbrink dotdash Bielefeld, Germany

dotdash/actix-extras 0

A collection of additional crates supporting the actix and actix-web frameworks.

dotdash/actix-web 0

Actix web is a small, pragmatic, and extremely fast rust web framework.

dotdash/ale 0

Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support

dotdash/body-parser 0

JSON body parsing for iron

dotdash/cargo 0

The Rust package manager

dotdash/clap-rs 0

A full featured, fast Command Line Argument Parser for Rust

dotdash/docopt.rs 0

Docopt for Rust (command line argument parser).

dotdash/dotvim 0

My vim configuration

dotdash/git2-rs 0

libgit2 bindings for Rust

dotdash/gltf-viewer 0

glTF 2.0 Viewer written in Rust

issue commentrust-lang/rust

Huge stack allocation is generated when assigning a huge piece of memory to a reference

Ok, so inlining runs first, thus the call slot optimization never triggers here.

If we mark init() as inline(never), then the call slot optimization runs but fails, because the mutable reference bar doesn't get marked as noalias (see https://github.com/rust-lang/rust/issues/54878), so the optimizer can't be sure that init() doesn't access the memory referenced by bar.h Using -Zmutable-noalias=yes fixes this and gets rid of the memcpy at the cost of not having init() inlined.

When init() gets inlined, we unfortunately get IR like this:

loop_block:
   ; yadda yadda
   br %done, label %memcpy_block, label %loop_block

memcpy_block:
    call void @llvm.memcpy(...)

Which means that we have a memcpy dependency that crosses a basic block boundary, and LLVM's memcpy optimizer doesn't handle these. There have been attempts to make it do that (for example by Patrick Walton, years ago), but AFAIK nothing has made to into LLVM (yet?).

bugadani

comment created time in 9 days

issue commentrust-lang/rust

Huge stack allocation is generated when assigning a huge piece of memory to a reference

@jonas-schievink so a slight misuse of terms that had me confused, ok :-)

@ecstatic-morse that explains it then. I think I have a well established history of getting slightly over-excited about my results and accidentally posting wrong results ;-)

There clearly is a missed optimization here, which the existing copy propagation pass could have picked up, if it wasn't limited to locals as destinations.

That said, I wonder why call slot propagation in LLVM doesn't handle it either. I'll try to look into that...

bugadani

comment created time in 9 days

issue commentrust-lang/rust

Huge stack allocation is generated when assigning a huge piece of memory to a reference

@ecstatic-morse How did you get those results, I cannot reproduce this simply merging #72205 and compiling the given code while RUSTC_STAGE=1 is set in the environment.

I also fail to see how NRVO would apply anyway. The extra copy is due to the temporary created in the caller, which uses an out-pointer and has a return type of (), so NRVO doesn't seem useful, and the callee is already writing straight to the return value anyway. Any pointers?

bugadani

comment created time in 10 days

issue openedwusyong/async-zmq

poll_event() never returns Pending state, causing the examples to fail

Since the introduction of the runtime agnostic code (I guess!) the poll_event() function no longer returns Poll::Pending, only Poll::Ready, possibly with a Err(Error::EAGAIN) value. This makes the examples fail with

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Unexpected(Resource temporarily unavailable)', examples/reply.rs:12:19

created time in 19 days

PR closed dense-analysis/ale

WIP: LSP: Support workspace/configuration

According to https://github.com/microsoft/language-server-protocol/issues/676 the didChangeConfiguration method only triggers a workspace/configuration from the server, which the client needs to handle, so effectively the current configuration support in ALE is not working at all with modern LSP servers.

This is a work-in-progress to add support for workspace/configuration, currently only hacked together far enough that it works for my use with rust-analyzer. I hope to extend it / clean it up, but if anyone wants to pick up from here, feel free to.

<!-- Before creating a pull request, do the following.

  • Read the Contributing guide linked above first.
  • Read the documentation that comes with ALE with :help ale-dev.

Have fun! -->

Where are the tests? Have you added tests? Have you updated the tests? Read the comment above and the documentation referenced in it first. Write tests!

Seriously, read :help ale-dev and write tests.

+39 -1

1 comment

1 changed file

dotdash

pr closed time in a month

pull request commentdense-analysis/ale

WIP: LSP: Support workspace/configuration

Uhm, ok, I made this a draft PR for a reason, and editing the comment about tests into my PR message instead of adding a standalone comment does feel pretty bad (also it's rather lucky that I noticed it, because I don't get a notification that way).

Guess I'm done with this PR then...

dotdash

comment created time in a month

PR opened dense-analysis/ale

WIP: LSP: Support workspace/configuration

According to https://github.com/microsoft/language-server-protocol/issues/676 the didChangeConfiguration method only triggers a workspace/configuration from the server, which the client needs to handle, so effectively the current configuration support in ALE is not working at all with modern LSP servers.

This is a work-in-progress to add support for workspace/configuration, currently only hacked together far enough that it works for my use with rust-analyzer. I hope to extend it / clean it up, but if anyone wants to pick up from here, feel free to.

<!-- Before creating a pull request, do the following.

  • Read the Contributing guide linked above first.
  • Read the documentation that comes with ALE with :help ale-dev.

Have fun! -->

Where are the tests? Have you added tests? Have you updated the tests? Read the comment above and the documentation referenced in it first. Write tests!

Seriously, read :help ale-dev and write tests.

+39 -1

0 comment

1 changed file

pr created time in a month

create barnchdotdash/ale

branch : workspace_config

created branch time in a month

fork dotdash/ale

Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support

fork in a month

delete branch dotdash/tui-rs

delete branch : list_overflow

delete time in a month

push eventdotdash/tui-rs

Björn Steinbrink

commit sha 95d38b5af8ae84606c88340054b6aa7f8a0f88e6

fix(widgets/list): fix line length calculation for selectable lists The code that outputs the list elements uses the full inner width of its block, without taking the width of the highlight symbol into consideration. This allows the elements to overflow the box and draw over the block's border. To fix that, we need to reduce the target width for the list elements.

view details

push time in a month

PR opened fdehau/tui-rs

fix(widgets/list): fix line length calculation for selectable lists

The code that outputs the list elements uses the full inner width of its block, without taking the width of the highlight symbol into consideration. This allows the elements to overflow the box and draw over the block's border. To fix that, we need to reduce the target width for the list elements.

+6 -4

0 comment

1 changed file

pr created time in a month

create barnchdotdash/tui-rs

branch : list_overflow

created branch time in a month

fork dotdash/tui-rs

Build terminal user interfaces and dashboards using Rust

fork in a month

pull request commentrust-lang/rust

Remove unneeded calls to format!()

Out of interest, how were these found? Clippy?

I wish it was ;-)

Some time in 2018 I added a hack to format!() to find unnecessary calls, but forgot to submit the results. Recently I rediscovered that branch, but rebasing failed, and lots of cases had already been fixed. Since the old approach was slow, I resorted to some creative use of ripgrep that left me with a few dozen places I manually checked when I was stumped by a completely unrelated problem and needed some brainless activity to clear my mind.

dotdash

comment created time in 3 months

create barnchdotdash/rust

branch : format

created branch time in 3 months

PR opened rust-lang/rust

Remove unneeded calls to format!()
+34 -53

0 comment

15 changed files

pr created time in 3 months

more