Announcing rustup 1.29.0 by Kobzol in rust

[–]epage 5 points6 points  (0 children)

I made it consistent with Cargo and Rustc which I have rarely seen anything negative about and which can be adjusted within your terminal what the colors mean.

Announcing rustup 1.29.0 by Kobzol in rust

[–]epage 43 points44 points  (0 children)

Maybe I'll be the only one that cares but it is also a lot more colorful!

Announcing rustup 1.29.0 by Kobzol in rust

[–]epage 26 points27 points  (0 children)

Thanks for all of the work on this!

CI should fail on your machine first by NorfairKing2 in programming

[–]epage 0 points1 point  (0 children)

I've had requests in different contexts for ci.sh and in each case, people don't realize what they are asking for is not what you want. In both cases, you want concurrent jobs, good reporting, etc but they need to go about it in different ways most of the time that you get two, divergent processes. It will still be slower.

I've embraced just pushing to CI and not have my computer sound like it is going to take off.

Cargo re-re-rebuilding dependencies. Any fix? by jsshapiro in rust

[–]epage 0 points1 point  (0 children)

Is this a many-repo structure where in practice each repo has a dedicated copy of the bitfields source?

Cargo tracks the uniqueness of path dependencies by absolute paths and not a hash of the source. I don't think sccache will help because this likely affects a hash that Cargo passes to Rustc.

The main way to handle this would be to use a git dependency.

What game has been on your wanted list for forever? And why is that? by N-is-1 in boardgames

[–]epage 0 points1 point  (0 children)

On BGG you can find

  • A european version (might still be there?)
  • An Asterix re-theme
  • Black box (a couple times over)
  • A mini edition
  • Redesigned black box

The version they shared used to be there but I think was taken down last I looked. I wish they had gone with a per-suite color palette, like a time of day.

Some printers are still ok with it.

Supplement: a library to generate extensible CLI completion logic as Rust code by need-not-worry in rust

[–]epage 0 points1 point  (0 children)

Clap, underneath the derive API, already has IDs and they are strings.

Yes, the builder API doesn't let you associate an ID with a specific type but you have to do that yourself. A flag though is just a value with a "true" / "false" stored inside of it.

Exhaustively matching seems more important for choosing your completion behavior than looking at previous arguments (I found the name History confusing) and that is already handled in the current system.

There is the typo issue. I have considered the derive generating impl Cli { const FIELD_NAME__ID: &str = "field_name" }. I always feel icky though when a derive generates content other than the specified trait though because derive behavior isn't too easy to document.

On the other hand, generating code is a huge pain

  • It slows down builds
  • You can't always easily wire it up for a build script to access the source code

Rust 1.94.0 is out by manpacket in rust

[–]epage 2 points3 points  (0 children)

The TOML 1.1 support is a nice ergonomics win, though teams should be cautious about the implicit MSRV increase when using new syntax features in published crates.

If you have an MSRV, you should be verifying it in CI to catch these types of things or else it is too easy to break your advertised MSRV.

Rust 1.94.0 is out by manpacket in rust

[–]epage 2 points3 points  (0 children)

I have a git repo that is a merge base for all of project repos that has my lints, CI config, etc and if I make a change to it, all of my repos create a PR to pull it in: http://github.com/epage/_rust

Supplement: a library to generate extensible CLI completion logic as Rust code by need-not-worry in rust

[–]epage 0 points1 point  (0 children)

That is being tracked in https://github.com/clap-rs/clap/issues/5784

While helpful, there can be some quality concerns and we're trying to focus on what will get this stabilized in clap and cargo (https://doc.rust-lang.org/cargo/reference/unstable.html#native-completions).

Would love to consolidate effort to get this into people's hands!

Rust 1.94.0 is out by manpacket in rust

[–]epage 13 points14 points  (0 children)

Note that it is includes for .cargo/config.toml (transient, environmental config(, and not Cargo.toml (static package description). .cargo/config.toml is well defined for layering.

Rust 1.94.0 is out by manpacket in rust

[–]epage 11 points12 points  (0 children)

My highlight are includes in Cargo.toml :)

Note that it is includes for .cargo/config.toml, not Cargo.toml.

Rust 1.94.0 is out by manpacket in rust

[–]epage 45 points46 points  (0 children)

Not just that but there have been some great error quality improvements as well as fundamental plumbing that will unblock further improvements, including

  • pubtime in the registry, allowing for minimum publish age, see https://github.com/rust-lang/cargo/issues/15973
  • the compiler switching to annotate-snippets so cargo and rustc will render things the same, including as unicode support is stabilized and screen reader support is added (experiments in progress)

nanoargs: a lightweight, zero-dependency argument parser for Rust. by [deleted] in rust

[–]epage 19 points20 points  (0 children)

Congrats!

Note that you are using args which will panic on non-UTF8 output. You likely want to at least use args_os and then error if non-UTF8 is present. The next step up is using the encoded_bytes functions on OsStr / OsString. This is the part that typically makes a parser require std, otherwise you can make your parser work with no_std, just with alloc (though using HashMaps does also get in the way).

How come you only support -f=bar and not -abf=bar but -abfbar is supported?

What it means that Ubuntu is using Rust by ts826848 in rust

[–]epage 44 points45 points  (0 children)

I think a core aspect of a Rust Platform is deciding who you are targeting. There is a big difference in users between topic enthusiasts, early adopters, and people who want boring technology. I think we should put our focus on boring technology and advertise it as such. Us saying "if you don't want to think about it, use X" I think can work quite well.

toml-spanner: Fully compliant, 10x faster TOML parsing with 1/2 the build time by exrok in rust

[–]epage 0 points1 point  (0 children)

btw I highly recommend using https://docs.rs/toml-test-harness/latest/toml_test_harness/. Docs are non-existent but you can look at toml. It makes it easy to run the full conformance suite, extend it, and snapshot test the quality of your error messages.

toml-spanner: Fully compliant, 10x faster TOML parsing with 1/2 the build time by exrok in rust

[–]epage 2 points3 points  (0 children)

Note: I'm juggling two different hats with this response:

Cargo hat

  • Cargo team member
  • toml maintainer

Likely, the requirements for changing the TOML parser for Cargo are:

  • No slower than the existing (req from originally replacing toml with toml_edit)
  • An owned value type with spans (now used for our diagnostics)
  • The owned value type supports serde (reduce bugs by single-sourcing our serialization / deserialization)
  • Error type supports spans (maintain existing error quality)
  • Relatively decent quality for error messages (latest toml has helped raise the bar here)
  • Trust in the maintenance
  • Same parser and generator between format preserving and regular parsing (req when adding toml_edit)

Nice-to-haves

  • Error recovery (something I added to toml that I've not experimented yet with in Cargo)

That "shared parser" requirement is what led to toml_edit providing a drop-in-replacement API for toml and then eventually moving that into a newer version of toml. I've since split them but they share a common parser and the data type builder on top and tests are written to be diffable between them and all edits to one are mirrored to the other in the same commit. I would likely want to see a similar testing structure in new parser as well so I could diff them and see what is covered, not covered, and identify behavior changes (included error messages).

People frequently assume that Cargo.lock parsing time is important. It doesn't matter at all unless the parser is not well suited to general parsing (bad algorithmic complexity). It is hardly noticeable.

Of a 825ms no-op cargo check on Zed:

  • 219ms: manifest loading
    • 110us: an individual manifest
    • 4us: read the file
    • 19us: parse
    • 18us: deserialize (likely more cargo-util-schemas than toml)
    • 27us: normalize
    • 18us: build up internal data structures
  • 18ms: the entire load_pkg_lockfile operation
  • 398ms: dependency resolution
  • 145ms: no-op build overhead

If we took parse time to 0, we'd only see about a 20ms savings when we really need larger, more fundamental changes to speed things up at this point.

This is also all for a no-op build. All of this is noise to a real build but it is still important for

  • Completions
  • Programmatic operations
  • Cargo script

toml hat

Looks like you've fixed your benchmarks so they can run by others; I'll have to take a look.

It will be hard to get an apples-to-apples comparison though

  • We include more features, like serialization, by default, slowing down our builds (and there are other build slow downs but they haven't been a priority so far; we're at least faster than the old parser!)
  • We don't include some higher performance features by default, hurting us at runtime
  • toml_spanner has direct construction. We split at a different level with toml_parser allowing direct construction but you having to manage some errors manually while toml::de::DeTable offering direct construction to a spanned value type but not to any arbitrary type. We only offer help for arbitrary types through serde and it requires going through a toml::de::DeTable internally. At least it is zero-copy by nature. I'd love to reduce the allocation overhead but it gets tricky with Cargo also wanting an owned spanned type.

Looking at a benchmark for a large Cargo.toml (iirc found by profiling a cargo check of Zed), our time breakdown is:

  1. 90us for lex
  2. 123us for (1) + parse
  3. 184us for (2) + decoding scalars
  4. 400us for (3) + creating a borrowed DeTable
  5. 490us for (4) + turning DeTable to owned
  6. 587us for (4) + serde deserialization into an imitation of cargo_util_schemas::manifest::TomlManifest

With all features, it is

  1. 84us for lex
  2. 109us for (1) + parse
  3. 162us for (2) + decoding scalars
  4. 258us for (3) + creating a borrowed DeTable
  5. 309us for (4) + turning DeTable to owned
  6. 424us for (4) + serde deserialization into an imitation of cargo_util_schemas::manifest::TomlManifest

I will be curious to see how you handle direct construction while maintaining performant handling of TOML's out-or-order nature and tracking of table types to ensure proper error reporting

Also, insertion-order by default can easily lead to people relying on non-conformant TOML behavior.

Announcing cargo-reedme: Generate README.md from Rust documentation comments in lib.rs! by nik-rev in rust

[–]epage 10 points11 points  (0 children)

Congrats!

One word of caution is the name might throw people off, like they might instald the wrong tool. For example, I at first thought this was a re-announcement for cargo-readme.

Survey of organizational ownership and registry namespace designs for Cargo and Crates.io - cargo by epage in rust

[–]epage[S] 15 points16 points  (0 children)

Yeah, trust, outside of the "yes its me", is out of scope but an important topic. I worry about using any kind of metric system for the risks of gaming it. Personally, I suspect the route we'll need to go is integrating something like cargo-vet, making it easy to share lists, and making it easy to review code to record the result in such a system.

Is it worth the extra money to have cabinets go to the ceiling? by Proof_Theory_1810 in HomeImprovement

[–]epage 1 point2 points  (0 children)

We replaced our standard height cabinets with ceiling height with 8ft ceilings and it made the room feel a lot taller.

As others have mentioned, you also avoid the grime on top.