profile
viewpoint

gluon-lang/gluon 2145

A static, type inferred and embeddable language written in Rust.

Marwes/combine 854

A parser combinator library for Rust

brendanzab/codespan 324

Beautiful diagnostic reporting for text-based programming languages.

alexcrichton/tokio-signal 88

Unix signal handling for tokio

gluon-lang/gluon_language-server 34

Language server providing completion for gluon

distil/rust_lua_ffi 22

Automatic Rust and Lua glue code generation for seamless FFI interop

gluon-lang/gluon-lang.org 9

The gluon-lang.org website.

Jim-Holmstroem/RunRustFromLua 3

Rust functions called from Lua (LuaJIT) FFI

PR opened gluon-lang/gluon

feat: Allow the http module to be used without a tcp listener

bors r+

+172 -104

0 comment

3 changed files

pr created time in 9 hours

created taggluon-lang/lsp-types

tagv0.83.0

Types for communicating with a language server

created time in a day

push eventgluon-lang/lsp-types

Markus Westerlind

commit sha 97dde9d2370b51f297bac0e924a1518b079bafb1

(cargo-release) version 0.83.0

view details

push time in a day

push eventgluon-lang/lsp-types

Jeremy Kolb

commit sha 097ba637292a5995143122fdfad3aeba9a741591

Align with changes from vscode-languageclient-7.0.0-next.10

view details

Jeremy Kolb

commit sha a45da6991cb47cfd7307fcf2dc36a288343ee22a

Add missed rename changes

view details

Jeremy Kolb

commit sha d518377003546d8f3e2749b8eb064eb3d213e09b

Update src/call_hierarchy.rs Co-authored-by: Markus Westerlind <marwes91@gmail.com>

view details

Markus Westerlind

commit sha f612a8450924ded4f6165486116494638c8eef76

Merge pull request #183 from kjeremy/align-vscode-languageclient-7.0.0-next.10 Align with changes from vscode-languageclient-7.0.0-next.10

view details

push time in a day

push eventgluon-lang/lsp-types

Martin Asquino

commit sha d83bb957689e87b75cca59a73bce9ade31e0abd8

Fix workspace_symbol_provider definition

view details

Markus Westerlind

commit sha 3642a565cd7fdac20d7f245e2bcb75b33715bbca

Merge pull request #184 from martskins/workspace-symbol-provider-fix Fix workspace_symbol_provider definition

view details

push time in 2 days

PR merged gluon-lang/lsp-types

Fix workspace_symbol_provider definition

Fixes the definition of the workspace_symbol_provider field in ServerCapabilities. See https://github.com/microsoft/language-server-protocol/issues/1109.

+10 -3

0 comment

1 changed file

martskins

pr closed time in 2 days

Pull request review commentgluon-lang/lsp-types

Align with changes from vscode-languageclient-7.0.0-next.10

 pub struct CallHierarchyItem {     /// The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.     /// Must be contained by the [`range`](#CallHierarchyItem.range).     pub selection_range: Range,++    /// A data entry field that is preserved between a call hierarchy prepare and incloming calls or outgoing calls requests.+    pub data: Option<Value>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<Value>,
kjeremy

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventMarwes/gluon

Markus Westerlind

commit sha 33b00fa61cfff4abcb6af819b09e6bcd000d4477

Make http types cloneable

view details

push time in 2 days

push eventMarwes/gluon

bors[bot]

commit sha 66cefd0c31c123a117b557fbb90cd087d72be21c

Merge #641 641: Update dependencies r=Marwes a=Marwes Co-authored-by: Markus Westerlind <marwes91@gmail.com>

view details

bors[bot]

commit sha 9a082df6adbbd3de78ff14097b7354a3a9aa3368

Merge #642 642: Add the std.http module r=Marwes a=Marwes Working to replace the iron webserver used in try_gluon with one based on hyper + gluon. Should let me fix some weirdness in the setup and enable https more easily. (+ more dogfooding of course) Co-authored-by: Markus Westerlind <marwes91@gmail.com>

view details

Markus Westerlind

commit sha 98908b5b42e544f9545551340cb766a0f3cc4f87

Version 0.9.2

view details

Markus Westerlind

commit sha a30c94e23b5649aa92bd4808e2382274f7abe1c9

Ignore .bak files

view details

Markus Westerlind

commit sha 5979c9673cf603abf4bb2151960edb0dce9046a1

fix: Don't generate warnings for VmType and Userdata derives

view details

bors[bot]

commit sha 2f1f21bb782941a01f634604ed116a028dbd4484

Merge #643 643: Release r=Marwes a=Marwes Co-authored-by: Markus Westerlind <marwes91@gmail.com>

view details

Markus Westerlind

commit sha fb30fda2624328f9893c222556fe89a5ad8c701b

feat: Allow std.http to use https

view details

Markus Westerlind

commit sha ec15b556bf8b09d4cc5b3f27106e3d5e4649f960

Don't shutdown the http server on tls errors

view details

Markus Westerlind

commit sha 514fd3b5501c15f4223fb9afb8fc96c34195c7b3

feat(vm): Add thread.join Lets two `IO` actions run concurrently

view details

Markus Westerlind

commit sha d5862e1407968d3c96dee73682071caf5829acf3

fix: Ensure all futures on the stack gets polled

view details

Markus Westerlind

commit sha 69dba621b5c8e1d507e3fc5c476422b799a6068c

feat: Allow headers to be part of the response

view details

Markus Westerlind

commit sha 221093e90d5af906c32320c2bb792bbb80094a45

Update changelog

view details

Markus Westerlind

commit sha 6ad33d523edae6b8e89bd1bcd905b290a3f4b48c

Version 0.9.3

view details

bors[bot]

commit sha f578405f8f88e5c414f176639d3a8ca9c4d303b5

Merge #645 645: Allow std.http to use https r=Marwes a=Marwes Co-authored-by: Markus Westerlind <marwes91@gmail.com>

view details

Robin Mirow

commit sha 48e1e11b345db2e69ca98cc78a63836100148b64

fix(codegen): Fix Type::variant call for VmType derive

view details

Joseph Price

commit sha 9e670f3fe7048c520cc0133996ca77fd20a3a5d0

Fix try link

view details

bors[bot]

commit sha 360f578256187ebe916a49a5d58bbdb858a8fec8

Merge #647 647: Fix try link r=Marwes a=joprice Looks like the trailing slash is needed to resolve the try page. Co-authored-by: Joseph Price <pricejosephd@gmail.com>

view details

bors[bot]

commit sha 6c79166ae76b77a620e3ae929e12653994ddeedd

Merge #646 646: Fix Type::variant call for VmType derive r=Marwes a=Laegluin Fixes `Type::variant` still being referred to as `Type::variants` in the `VmType` derive, which is currently broken for enums because of it. Co-authored-by: Robin Mirow <robinmirow@live.com>

view details

Markus Westerlind

commit sha d51f96a5888027f3e19b02a4a4c532bbaa329d91

chore: Automatically update the changelog

view details

oooooba

commit sha 927977849594b0daebf274df4bdaac55d93eb2d9

feat: Add general purpose debugging status

view details

push time in 2 days

PR opened apache/arrow

[Rust] Some refactorings

Just some refactorings and extensions to debug printing I did while trying to track down what I thought were a bug in the parquet writer. One breaking change in https://github.com/apache/arrow/commit/c8c02a9a1726ef219603ff76ad39c2bd287ff8f8 but I don't think it should affect users much.

+86 -158

0 comment

12 changed files

pr created time in 3 days

create barnchMarwes/arrow

branch : refactor

created branch time in 3 days

Pull request review commentmitsuhiko/redis-rs

Converts native_tls::Error to WithDescriptionAndDetail

 impl From<Utf8Error> for RedisError {  #[cfg(feature = "tls")] impl From<native_tls::Error> for RedisError {-    fn from(_: native_tls::Error) -> RedisError {+    fn from(err: native_tls::Error) -> RedisError {         RedisError {-            repr: ErrorRepr::WithDescription(ErrorKind::IoError, "TLS error"),+            repr: ErrorRepr::WithDescriptionAndDetail(+                ErrorKind::IoError,+                "TLS error",+                format!("{:?}", err),
                format!("{}", err),
kbacha

comment created time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

pull request commentgluon-lang/gluon

fix: Recognize raw string literals without any `#`

bors r+

Marwes

comment created time in 3 days

push eventgluon-lang/gluon-lang.org

push time in 4 days

push eventmitsuhiko/redis-rs

Omid Ghaffarinia

commit sha b6cb8b6e2983450905ee215221ebfb9f2dd62638

Use password from query string for unix instead of password param which is not supported by url::Url

view details

Omid Ghaffarinia

commit sha 9b08a6c026239ffeb3cce1b1d8a265c6651f34b2

Add some tests and add 'user' to documention

view details

Markus Westerlind

commit sha 98df733dcdfc2c6d9c80e2c60c0b1088da7c7c28

Merge pull request #356 from oghaffarinia/master Use password from query string for unix instead of password param which is not supported by url::Url BREAKING CHANGE Passwords must be passed as query parameters now

view details

push time in 4 days

PR merged mitsuhiko/redis-rs

Use password from query string for unix instead of password param which is not supported by url::Url

Using a password for unix protocol is not working from url, this can fix it by reading password from query string instead

+74 -8

2 comments

2 changed files

oghaffarinia

pr closed time in 4 days

issue commentterraform-providers/terraform-provider-aws

Inconsistent diff for ECS task definitions that references aws_msk_cluster data resource

I used that workaround for a good while but after increasing the number of kafka brokers in the cluster it now appears that bootstrap_brokes now only includes a subset of all the brokers in the clusters. So sorting the brokers manually is not enough, the broker list still change between invocations.

moyuanhuang

comment created time in 5 days

created tagMarwes/redis-cluster-async

tagv0.4.0

Redis cluster library for Rust

created time in 5 days

push eventMarwes/redis-cluster-async

Markus Westerlind

commit sha b064b5fd969248eda3f96051c6d326ccdb020462

(cargo-release) version 0.4.0

view details

Markus Westerlind

commit sha 7cb96852417f1a54ff47c24ae63f154f31138d4c

(cargo-release) start next development iteration 0.4.1-alpha.0

view details

push time in 5 days

delete branch Marwes/redis-cluster-async

delete branch : update

delete time in 5 days

push eventMarwes/redis-cluster-async

Markus Westerlind

commit sha a856e8eaa330a443db52b6b037f9a63ca342826f

Update to redis 0.17

view details

Markus Westerlind

commit sha e6a0eb2d844f18cfca65fc19dfc475cfa850c7eb

refactor: Use tokio::test

view details

Markus Westerlind

commit sha 2d5f1cdc4c5e07994b2bc45bf186d8161fb00aba

chore: Make clearing more robust in testing

view details

Markus Westerlind

commit sha 3bc39b90cc6df11a40e8d8bf813885dc5627bfeb

Merge pull request #4 from Marwes/update Update to redis 0.17

view details

push time in 5 days

PR merged Marwes/redis-cluster-async

Update to redis 0.17
+688 -443

0 comment

4 changed files

Marwes

pr closed time in 5 days

fork Marwes/proptest

Hypothesis-like property testing for Rust

fork in 5 days

push eventMarwes/redis-cluster-async

Markus Westerlind

commit sha 2d5f1cdc4c5e07994b2bc45bf186d8161fb00aba

chore: Make clearing more robust in testing

view details

push time in 5 days

push eventMarwes/redis-cluster-async

Markus Westerlind

commit sha e6a0eb2d844f18cfca65fc19dfc475cfa850c7eb

refactor: Use tokio::test

view details

push time in 5 days

pull request commentMarwes/redis-cluster-async

Add password support

Thanks!

jensenn

comment created time in 5 days

push eventMarwes/redis-cluster-async

Neil Jensen

commit sha 77e29048342a3b26c231fd49e6ebe8b77686038d

Add password support

view details

Markus Westerlind

commit sha 0483bd3c6cea2f099935fe635221525eac8ff2b4

Merge pull request #3 from jensenn/feature/password_support Add password support

view details

push time in 5 days

PR merged Marwes/redis-cluster-async

Add password support

This works, however, I'm not super happy with the fact that it has to parse the addr in order to grab the password and pass it on.

+18 -5

1 comment

1 changed file

jensenn

pr closed time in 5 days

push eventMarwes/redis-cluster-async

Neil Jensen

commit sha e2eb859c0c10d55817a5952d60ca2c485a1d4d00

Use redis 0.15

view details

Neil Jensen

commit sha bf4febc4559764ba3eedd2b9ae32aefedf539df0

Handle slot calculation for EVAL and EVALSHA

view details

jensenn

commit sha d10da466dc7a8882e8f7e0da3f1e21fa3ee2c2cf

remove unnecessary lifetime Co-Authored-By: Markus Westerlind <marwes91@gmail.com>

view details

Markus Westerlind

commit sha 3e212079207e67ba23ccd678529a4150600d1369

Merge pull request #2 from jensenn/fix-eval-evalsha-with-keys Fix eval and evalsha with keys

view details

Markus Westerlind

commit sha 2e0655b70a115fac5a7a8ced64673aaef33df3f5

(cargo-release) version 0.3.0

view details

Markus Westerlind

commit sha a856e8eaa330a443db52b6b037f9a63ca342826f

Update to redis 0.17

view details

push time in 5 days

PR opened Marwes/redis-cluster-async

Update to redis 0.17
+540 -314

0 comment

3 changed files

pr created time in 5 days

create barnchMarwes/redis-cluster-async

branch : update

created branch time in 5 days

issue commentmitsuhiko/redis-rs

Async connection timeout?

If you really want to guard all commands you should be able to implement ConnectionLike on your own for a wrapper.

struct TimeoutConnection<C> {
    con: C,
    timeout: Duration,
}

impl<C: ConnectionLike> ConnectionLike for TimeoutConnection<C> {
}
Luminoth

comment created time in 5 days

pull request commentmitsuhiko/redis-rs

Async timeout support

For synchronous io you are more or less forced to use timeouts at the lower level and in other languages there has often been a lack of support for cancellation which also forces the timeouts lower. However in Rust, cancellation can you be a future being dropped so there is no actual need to for the timeout (cancellation) to be at this lower level. Instead the timeout can be fully opt-in, can be put closer to the place that actually cares about being blocked (allowing for multiple operations to be within the same timeout, for instance) and allows for different redis queries to have different timeouts (some queries are fast, others are slow).

Luminoth

comment created time in 6 days

pull request commentrust-lang/rust

feat: Update hashbrown to instantiate less llvm IR

Pushed a new commit which simply uses hashbrowns master branch, this has the merged https://github.com/rust-lang/hashbrown/pull/204 but not the unmerged https://github.com/rust-lang/hashbrown/pull/205 . Could do with a perf run to check that at least this first PR does not affect things (I don't see these slowdowns locally).

Marwes

comment created time in 6 days

push eventMarwes/rust

Markus Westerlind

commit sha d5a8db3ebef3fbb80e2838d8ebddd87dff8a8dd5

Sanity check against hashbrown master

view details

push time in 6 days

push eventMarwes/schemafy

Vadim Chugunov

commit sha 0ec75f5cf7c63f462f1e003bfec06b5dac0483dc

#[skip_serializing_if="Option::is_none"]

view details

Markus Westerlind

commit sha 9b84d6085c909aea23fbd8ec5311c8455e5fb336

Merge pull request #37 from vadimcn/option Add #[skip_serializing_if="Option::is_none"] to optional attributes.

view details

push time in 6 days

issue closedMarwes/schemafy

Skip serialization of Option::None's

Schemafy should emit #[serde(skip_serializing_if="Option::is_none")] for all Option's (unless that field is required, of course).

closed time in 6 days

vadimcn

pull request commentrust-lang/rust

perf: Only process changed obligations in ObligationForest

Still have a failing test to fix but a perf run would be useful to see if only using this on large obligation forests would help

Marwes

comment created time in 6 days

push eventmitsuhiko/redis-rs

Weihang Lo

commit sha 1bf795174521160934f3695326897458246e4978

feat: add doc_cfg for Makefile and docs.rs config

view details

Markus Westerlind

commit sha b640cb902be2182196de3a941af14b913988e78f

Merge pull request #386 from weihanglo/feat/doc_cfg Display feature-listing markers on docs

view details

push time in 6 days

PR merged mitsuhiko/redis-rs

Display feature-listing markers on docs

This would refine docs on docs.rs to display feature-listing markers.

Changes

  • Set RUSTDOCFLAGS="--cfg docsrs" for docs.rs metadata
  • Update make docs to use nightly compiler for feature-listing markers
  • Warn for #![cfg_attr(docsrs, warn(broken_intra_doc_links))]

Screenshots

image

+6 -3

0 comment

4 changed files

weihanglo

pr closed time in 6 days

pull request commentmitsuhiko/redis-rs

Async timeout support

You can just wrap your queries with this timeout instead of putting it in redis itself. I don't see any reason to put this into redis.

Luminoth

comment created time in 6 days

push eventMarwes/rust

Markus Westerlind

commit sha 80757776f8f85cdaea0d6c2c67088e7cdbd7eecf

a

view details

push time in 7 days

push eventMarwes/rust

Markus Westerlind

commit sha 71e98c51f228dcc65a0c75f37f83b98c6acfb282

a

view details

push time in 7 days

issue commentdeadlinks/cargo-deadlinks

Print location of the dead links

Yeah, as long as I have the link it is easy to find where it comes from (though having the line directly ould of course be better)

stanislav-tkach

comment created time in 7 days

pull request commentrust-lang/rust

perf: Only process changed obligations in ObligationForest

Hacked in the suggestion by @Diggsey , could use a perf run (just chose 100 as an arbitrary inflexion point now).

Marwes

comment created time in 8 days

push eventMarwes/rust

Markus Westerlind

commit sha 1e255677816658300bb3a52833ee3879b95750e3

a

view details

push time in 8 days

push eventMarwes/rust

Matt Brubeck

commit sha b4b383981abac7ca8aa180c7ae3e28876615b887

Add PartialEq impls for Vec <-> slice

view details

Mateusz Mikuła

commit sha 0ad3da06843089c0bf10d6caa3fbbc72fa67787a

Enable ASLR for windows-gnu

view details

Cassandra Fridkin

commit sha a009e2838b25df2761093d727d322a59f69d8f68

There isn't a way to pass --remove yet, but you can rm if u like

view details

Alexis Bourget

commit sha 492826ac144666c75d68bc0a0121453ecc08561f

Add a note about the panic behavior of math operations on time objects

view details

Tim Nielens

commit sha 390a13b06c79d4177b829097b06453e38188081f

needless-lifetime - fix nested elision site FPs

view details

Tim Nielens

commit sha a60e5de90c7370d4fb3e6561d3cb55495cda2e2a

needless-lifetime / nested elision sites / PR remarks

view details

Tim Nielens

commit sha c8e9e52303da6dff4bc5cc4db3021d608fca6c70

needless-lifetime / add test cases for nested elision sites

view details

Takayuki Nakata

commit sha 1778a1ec4615a42a8ba9497006b07859186c08a1

Restrict `same_item_push` to suppress false positives It emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those.

view details

Takayuki Nakata

commit sha 0117ea2b016133145f9e02e27421ac3672b42f57

Refactoring: use inner function

view details

Takayuki Nakata

commit sha b80576fba633e1fc214c9f6900d7ca3424bda6d0

Some refactoring

view details

Takayuki Nakata

commit sha 14faebe20ea82392f393c3ff5efaab7250e51989

Add some tests to `same_item_push` Add tests in which the variable is initialized with a match expression and function call

view details

Takayuki Nakata

commit sha 2972ad3ef661071531a61ec8999b668a6b734b74

Refactoring: tests in `same_item_push`

view details

Takayuki Nakata

commit sha 730ca457f580247667ed0cd5965bc08752ebc0b3

Address `items_after_statement`

view details

Nathan West

commit sha a02014280586b53997622c501db00398376967a8

Refactor io/buffered.rs into submodules

view details

Nathan West

commit sha 96229f02402e82914ec6100b28ad2cbdd273a0d4

move buffered.rs to mod.rs

view details

Dylan MacKenzie

commit sha 72b402ed38f0c71461038aef8a49a02e49280788

Add pass names to some common dataflow analyses

view details

Nathan West

commit sha 6d75cdfc9ed9e6987bd23add6cf3954d2499dce2

Added updated compiler diagnostic

view details

Amjad Alsharafi

commit sha da700cba08a2b194d19e63d3c51ebadce96fe46b

Stabilize move_ref_pattern

view details

Amjad Alsharafi

commit sha afb9eeb1b9ea16ca65e38673a0ef3e7be81d7252

Disabled error `E0007` from rustc_error_codes

view details

Nathan West

commit sha c4280af8285c61b367a87c8f6eef9876011a8150

Retry fix error reporting suggestions

view details

push time in 8 days

push eventMarwes/rust

Nazım Can Altınova

commit sha a313abe3ba989ba4b6c041627c903488886f8559

Manually implement Debug for BTreeMap::{IntoKeys,IntoValues} structs

view details

Nazım Can Altınova

commit sha 456738e3d1ad7dadffaed287d3055ca38b5fa375

Only print values in the Debug of HashMap::ValuesMut struct

view details

Nazım Can Altınova

commit sha c346e89db8a57e15111daa35685a2542d3be7c77

Manually implement Debug for BTreeMap::ValuesMut struct Deriving debug prints all the values including keys. But ValuesMut struct should only print the values.

view details

Nazım Can Altınova

commit sha 8faf550e5f7211188bc9560ae459c155fb1aafdf

Remove the unused bounds from Debug impl of HashMap::{IntoKeys,IntoValues}

view details

kadmin

commit sha 8894b366fdb976a703fe76010f6e56c591cada1f

Remove error message in specific case In the case that a trait is not implemented for an ADT with type errors, cancel the error.

view details

CAD97

commit sha 728938346b02a9688c44253c19b15baa7551fd80

Adjust rc::Weak::from_raw to support unsized T

view details

CAD97

commit sha 0c61ce2cf0560577923abafab2e5bfce14516525

?Sized bounds for rc::Weak::as_ptr and friends

view details

CAD97

commit sha 5e7406c9569dce75a042ce079918cf03cfca842a

Adjust sync::Weak::from_raw to support unsized T

view details

CAD97

commit sha 9d9903c5a50bb1f5b5fc3045b86172279eff7d30

Allow Weak::as_ptr and friends for unsized T

view details

CAD97

commit sha 3d07108d3600dff50e564f57dd390337dbe14d55

Add tests for weak into/from raw

view details

David Wood

commit sha 01f65afa4adff6dfbea84621e6851c028aaa7159

diag: improve closure/generic parameter mismatch This commit improves the diagnostic when a type parameter is expected and a closure is found, noting that each closure has a distinct type and therefore could not always match the caller-chosen type of the parameter. Signed-off-by: David Wood <david@davidtw.co>

view details

Jubilee Young

commit sha 247b73939a619ea4dcb2affbe1c285d20d93a0b8

Move Wrapping<T> ui tests into library

view details

Jubilee Young

commit sha 797cb9526a627c37b9bb9f6be6d3b54789b67c26

Fix to libstd test

view details

Jubilee Young

commit sha ac96f5b39ca7d9fad8571595c476c2db0bce8438

Test and reject out-of-bounds shuffle vectors

view details

Mara Bos

commit sha 84ef603c8400db203fefd714de963c88e5523424

Fix 'FIXME' about using NonZeroU32 instead of u32. It was blocked by #58732 (const fn NonZeroU32::new), which is fixed now.

view details

Pietro Albini

commit sha 0917b2123fff6cf5357b5edd5db6d675313ab8bd

build-manifest: move PkgType into the versions module

view details

Pietro Albini

commit sha 3bddfea7e23341f788526f8b303b9a27038511e3

build-manifest: stop receiving release numbers from bootstrap

view details

Without Boats

commit sha 82f5928ca68acceb1d1bd9e2b09554744e4a1dfe

Make RawFd implement the RawFd traits

view details

Without Boats

commit sha acc136ce0a665a32ddf1a16544b6f6d7a7153c30

fix typos

view details

Without Boats

commit sha 3fe279fc658450a3e3140f014554139493674217

spend another CI build to delete a double newline

view details

push time in 8 days

push eventMarwes/rust

Markus Westerlind

commit sha 805fd84ff566f5288b12a90166f46ea0e92389a3

test

view details

push time in 9 days

Pull request review commentrust-lang/rust

TypedArena: Eliminate intermediate copy if Iterator size is known

 impl<T> Default for TypedArena<T> {     } } +trait IterExt<I, T> {+    fn write_to_arena(iter: I, arena: &TypedArena<T>) -> &mut [T];+}++impl<T, I> IterExt<I, T> for I+where+    I: Iterator<Item = T>,+{+    #[inline]+    default fn write_to_arena(iter: I, arena: &TypedArena<T>) -> &mut [T] {+        arena.alloc_from_iter_gen(iter)+    }+}++impl<T, I> IterExt<I, T> for I+where+    I: Iterator<Item = T> + TrustedLen,+{+    #[inline]+    fn write_to_arena(mut iter: I, arena: &TypedArena<T>) -> &mut [T] {+        let size_hint = iter.size_hint();++        match size_hint {+            (0, Some(_)) => &mut [],+            (len, Some(_)) => {+                // no need to check min == max because of TrustedLen++                // SAFETY: TrustedLen implementors must ensure they return exactly as many+                // elements as they tell via `size_hint()`.+                unsafe {+                    // We know the exact number of elements the iterator will produce here+                    let start_addr = arena.alloc_raw_slice(len);+                    let mut mem = start_addr;++                    while let Some(value) = iter.next() {

One thing that could work, with only a little overhead, is to allocate a new chunk for any allocation calls inside the iterator. I believe this would work without TrustedLen also.

Pseudo rust

let slice = self.alloc_raw_slice();
let chunk_index = self.current_chunk;
// Move to the next chunk, if no next chunk exists the next allocation will force a new chunk to be created
self.current_chunk += 1;
for elem in iterator {
    slice.fill(elem);
}
// Move back to the current chunk so we can try filling the rest of it
self.current_chunk = chunk_index;

// Search for the first chunk
fn get_current_chunk(&self, needed: usize) -> &mut Vec {
    for chunk in &mut self.chunks[self.current_chunk..] {
        if chunk.capacity()  - chunk.len() >= needed {
             self.current_chunk = index;
             return chunk
        }
    }
    self.allocate_chunk()
}
bugadani

comment created time in 9 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

TypedArena: Eliminate intermediate copy if Iterator size is known

 impl<T> Default for TypedArena<T> {     } } +trait IterExt<I, T> {+    fn write_to_arena(iter: I, arena: &TypedArena<T>) -> &mut [T];+}++impl<T, I> IterExt<I, T> for I+where+    I: Iterator<Item = T>,+{+    #[inline]+    default fn write_to_arena(iter: I, arena: &TypedArena<T>) -> &mut [T] {+        arena.alloc_from_iter_gen(iter)+    }+}++impl<T, I> IterExt<I, T> for I+where+    I: Iterator<Item = T> + TrustedLen,+{+    #[inline]+    fn write_to_arena(mut iter: I, arena: &TypedArena<T>) -> &mut [T] {+        let size_hint = iter.size_hint();++        match size_hint {+            (0, Some(_)) => &mut [],+            (len, Some(_)) => {+                // no need to check min == max because of TrustedLen++                // SAFETY: TrustedLen implementors must ensure they return exactly as many+                // elements as they tell via `size_hint()`.+                unsafe {+                    // We know the exact number of elements the iterator will produce here+                    let start_addr = arena.alloc_raw_slice(len);+                    let mut mem = start_addr;++                    while let Some(value) = iter.next() {

The problem with that is that there may be more things allocated after this allocation which has already succeded and handed out a reference. So there isn't a way to undo this allocation as far as I can see (without adding another Vec to keep track of failed allocations I guess, I suppose that Vec wouldn't be used 99% of the time so it wouldn't add any overhead other than an increased arena size and complexity).

bugadani

comment created time in 9 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

TypedArena: Eliminate intermediate copy if Iterator size is known

 impl<T> Default for TypedArena<T> {     } } +trait IterExt<I, T> {+    fn write_to_arena(iter: I, arena: &TypedArena<T>) -> &mut [T];+}++impl<T, I> IterExt<I, T> for I+where+    I: Iterator<Item = T>,+{+    #[inline]+    default fn write_to_arena(iter: I, arena: &TypedArena<T>) -> &mut [T] {+        arena.alloc_from_iter_gen(iter)+    }+}++impl<T, I> IterExt<I, T> for I+where+    I: Iterator<Item = T> + TrustedLen,+{+    #[inline]+    fn write_to_arena(mut iter: I, arena: &TypedArena<T>) -> &mut [T] {+        let size_hint = iter.size_hint();++        match size_hint {+            (0, Some(_)) => &mut [],+            (len, Some(_)) => {+                // no need to check min == max because of TrustedLen++                // SAFETY: TrustedLen implementors must ensure they return exactly as many+                // elements as they tell via `size_hint()`.+                unsafe {+                    // We know the exact number of elements the iterator will produce here+                    let start_addr = arena.alloc_raw_slice(len);+                    let mut mem = start_addr;++                    while let Some(value) = iter.next() {

Isn't this unsound if next panics? I assume the arena would try to free uninitialized memory in that case (*).

(*) When I did this same optimization I added a drop guard which fills the slice with default values (). () Default can also panic but in that case the process abort, though I know in my case that Default won't panic for any of the types that use it.

bugadani

comment created time in 9 days

PullRequestReviewEvent

push eventMarwes/gluon

Markus Westerlind

commit sha 4d66fbb37f5acae81c28fe3af715b8d1c04a2ab5

fix: Recognize raw string literals without any `#` Fixes #885

view details

push time in 9 days

pull request commentgluon-lang/gluon

feat: Compile block expressions as monadic sequences

bors r+

Made it so the formatter keeps seq if it is written so both ways of writing it are equally viable now. Probably will end up removing one of the ways but for now this prevents people from writing it without seq and being confused that nothing happens.

Marwes

comment created time in 9 days

push eventMarwes/gluon

Markus Westerlind

commit sha 9751073ed7c18fe299c585de86980dddb721792e

Keep seq after formatting

view details

push time in 10 days

push eventMarwes/gluon

Markus Westerlind

commit sha 8e7ddadd1d2b17f4f86b88fe06f848c2961f4a66

Keep seq after formatting

view details

push time in 10 days

issue commentrust-lang/rust

Trait not implemented with lifetimes and async code

Seeing this when using https://docs.rs/futures/0.3.6/futures/stream/trait.StreamExt.html#method.buffered in some instances.

traxys

comment created time in 10 days

push eventMarwes/combine

Sebastian Thiel

commit sha 9fb3c8e5e32b6ec2a947008d7ef6d9bf9b912294

Fix clippy for good * allow not using 'matches!()' for now due to constraint to Rust 1.40 * run with `cargo clippy --examples` to catch more issues and fix them

view details

Sebastian Thiel

commit sha b5c12b6211d14931dfb61e8cdbc10c99b006e5ec

run `cargo fmt`

view details

Markus Westerlind

commit sha b2f38d4f930afa46fe810237e11c0b8052c39089

Merge pull request #301 from Byron/master Fix clippy for good

view details

push time in 10 days

PR merged Marwes/combine

Fix clippy for good
  • allow not using 'matches!()' for now due to constraint to Rust 1.40
  • run with cargo clippy --examples to catch more issues and fix them
+15 -19

0 comment

4 changed files

Byron

pr closed time in 10 days

PullRequestReviewEvent

delete branch Marwes/cargo-deadlinks

delete branch : update

delete time in 11 days

push eventMarwes/cargo-deadlinks

Markus Westerlind

commit sha 6a7803db586906419c34d232088803c355501026

Update Cargo.toml

view details

push time in 11 days

Pull request review commentdeadlinks/cargo-deadlinks

Update dependencies

 readme = "README.md" license = "MIT OR Apache-2.0"  [dependencies]-cargo_metadata = "0.6.4"-docopt = "0.8"-env_logger = "0.3"-html5ever = "0.22"-log = "0.3"+cargo_metadata = "0.9"+docopt = "1"+env_logger = "0.7"+html5ever = "0.24"
html5ever = "0.25"
Marwes

comment created time in 11 days

PullRequestReviewEvent

issue commentdeadlinks/cargo-deadlinks

Maintenance status of cargo-deadlinks

Sorry, no ,I have enough repositories I for which I am a passive maintainer on :)

jyn514

comment created time in 11 days

PR opened seanmonstar/warp

perf: Reduce the amount of code generated for path!

This does two things to reduce the amount of code path! generates, first it removes warp::any() filter at the start of each path, therefore removing one level of And as well.

Next I modified the macro to accumulate consecutive string literal segments and combining them into one via concat!. Since each segment generates its own static type this significantly reduce the amount of code when this applies (path!("abc" / "123" / "456")). I did have to cahge the behaviour of path() for this to accept / but I can change this combining to just be an implementation detail instead.

+89 -26

0 comment

1 changed file

pr created time in 11 days

create barnchMarwes/warp

branch : simplify_path

created branch time in 11 days

PR opened seanmonstar/warp

Simplify some combinators

Reduce the amount of IR generated slightly, but mainly cleans them up a bit

+82 -49

0 comment

5 changed files

pr created time in 11 days

push eventMarwes/warp

Markus Westerlind

commit sha d2e191146eed6c76f07541b81070960026feb676

Simplify And a bit

view details

Markus Westerlind

commit sha 831f312c4843c45c12591f15a809725f72300bf1

refactor: Simplify unify

view details

Markus Westerlind

commit sha 0cda43c5dfd2934fd04b15f2bdbfc80fff926557

Simplify and_then

view details

push time in 11 days

push eventMarwes/warp

Markus Westerlind

commit sha 9efe63a899c1f1c87e6b2b5b0f347ca7030c2838

refactor: Simplify unify

view details

Markus Westerlind

commit sha 3fb7aacf9167227f967a3ba0745522b074ca1f1f

Simplify and_then

view details

push time in 11 days

push eventMarwes/warp

Markus Westerlind

commit sha 0d61d96bafd1cb0d47f353356c77a2519ef6dedc

feat: Reduce the amount of llvm IR generated for path By join static string literals in path! we instantiate less `path` calls and less `and` calls (since there are less things to join). This changes the behaviour of `path` to accept `/` if this is not wanted this could instead be hidden as an implementation detail.

view details

Markus Westerlind

commit sha d25ec24b01c905a01207a2f11ff14825f5783489

refactor: Simplify unify

view details

Markus Westerlind

commit sha d0db5365df0f42933fdc25dd8233ceef76007d99

Simplify and_then

view details

push time in 11 days

push eventMarwes/warp

Markus Westerlind

commit sha a0cec9b159768b3338603bfd44130826544576d0

Simplify And a bit

view details

Markus Westerlind

commit sha 3b208df14dc16b876730c149db2b9e6f6e924109

feat: Reduce the number of `and` instantiations of path

view details

Markus Westerlind

commit sha 8b67bd363ceff2fb45dd6ebfa311ccda384b0d5c

feat: Reduce the amount of llvm IR generated for path By join static string literals in path! we instantiate less `path` calls and less `and` calls (since there are less things to join). This changes the behaviour of `path` to accept `/` if this is not wanted this could instead be hidden as an implementation detail.

view details

Markus Westerlind

commit sha 3fe72bdc03cdeac96c12c956cfce07ac01558db5

refactor: Simplify unify

view details

Markus Westerlind

commit sha 87d81ebcbb00a02f313987b490714abe359b2fd3

Simplify and_then

view details

push time in 11 days

push eventMarwes/hashbrown

Markus Westerlind

commit sha cbcd654971a52709791c31de2d9a6325f70699b8

Finish the comment in the benchmarks

view details

push time in 11 days

Pull request review commentrust-lang/hashbrown

Remove the need for unwrap when using ProbeSeq

 fn h2(hash: u64) -> u8 { /// Proof that the probe will visit every group in the table: /// <https://fgiesen.wordpress.com/2015/02/22/triangular-numbers-mod-2n/> struct ProbeSeq {-    bucket_mask: usize,     pos: usize,     stride: usize, } -impl Iterator for ProbeSeq {-    type Item = usize;--    #[inline]-    fn next(&mut self) -> Option<usize> {+impl ProbeSeq {+    fn move_next(&mut self, bucket_mask: usize) {

ProbeSeq never changes it so it duplicates data already found in the table. Figured it was only there since Iterator::next couldn't take an argument.

Marwes

comment created time in 11 days

PullRequestReviewEvent

push eventMarwes/hashbrown

Markus Westerlind

commit sha 00eb5fbe44c688261040c09460aa91aad5f1a219

nits

view details

push time in 11 days

create barnchMarwes/warp

branch : simplify

created branch time in 11 days

PR opened rust-lang/hashbrown

Remove the need for unwrap when using ProbeSeq

Changes the order of operation here a bit so that the code only moves to the next position if it is actually necessary which could be faster, or at least makes for less work for LLVM.

+47 -39

0 comment

2 changed files

pr created time in 12 days

create barnchMarwes/hashbrown

branch : probe

created branch time in 12 days

pull request commentrust-lang/rust

feat: Update hashbrown to instantiate less llvm IR

Did a couple more improvements. The only thing that may be a bit slower according to hashbrowns benchmarks is the iteration, however that should practically be unchanged modulo some data layout in the iterator. Not sure why it is slower sometimes in rustc's benchmarks.

Could use another perf run.

Marwes

comment created time in 12 days

push eventMarwes/rust

Markus Westerlind

commit sha 168bbf338b3db0d44f0a2ca4c6093d76c7a840ec

Update hashbrown

view details

push time in 12 days

push eventMarwes/hashbrown

Markus Westerlind

commit sha 57b9ebe44253a99bca1ded25067e0b81403e800a

Add some missing inline annotations

view details

push time in 12 days

pull request commentMarwes/combine

Apply cargo clippy and cargo fmt

Thanks!

Byron

comment created time in 13 days

push eventMarwes/combine

Sebastian Thiel

commit sha 8065f5d71097771d66b9be891655eeda733c6bec

Apply changes suggested by clippy

view details

Sebastian Thiel

commit sha 27fa6c5fcdf4522696588f4504d3fbbd4196ec90

(selective) cargo fmt

view details

Sebastian Thiel

commit sha c1f50d0b6e61ce7710a341e7fce37ae1af75fdf8

remove matches! to restore compat. with Rust 1.40

view details

Markus Westerlind

commit sha 398f498b852f9fadcfd4b6a0fdc92e8c4bc90a47

Merge pull request #300 from Byron/master Apply cargo clippy and cargo fmt

view details

push time in 13 days

PR merged Marwes/combine

Apply cargo clippy and cargo fmt

What's missing is running these on CI, which I refrained from doing in this PR to not conflate things.

+39 -42

3 comments

15 changed files

Byron

pr closed time in 13 days

push eventMarwes/rust

Markus Westerlind

commit sha 9df396fe27a2fc4c85e57fbad3e430b10dbca96c

Update hashbrown

view details

push time in 13 days

Pull request review commentMarwes/combine

Apply cargo clippy and cargo fmt

 rust: - nightly - beta - stable-- 1.40.0+- 1.42.0

1.40 is explicitly the minimum supported rust version for the current combine major version. I don't necessarily want to keep this minimum version until the next breaking (major version) but I do try to stick to it unless actually necessary.

For something like documentation though I would rather keep the minimum version as is.

So either skip using matches! or disable doc tests on 1.40 would be acceptable to me.

Byron

comment created time in 13 days

PullRequestReviewEvent
more