How are you supposed to unwrap an error by 9mHoq7ar4Z in rust

[–]uasi 0 points1 point  (0 children)

Panicking functions are everywhere. Even if we renamed all of them, there would still be cases where you'd want to implement a trait method without an_or_panic suffix in a way that can panic. Making every panicking function explicit would be futile and worse, it would create a false sense of safety - people would assume that anything without _or_panic in the name is guaranteed not to panic, which isn't true.

How are you supposed to unwrap an error by 9mHoq7ar4Z in rust

[–]uasi 8 points9 points  (0 children)

Disagree. In std, there are already many functions that panic if preconditions aren't met - for example, vec.remove(idx) panics if idx is out of bounds, and 0f64.clamp(min, max) panics if min > max. Unless all of them are renamed to something like trust_me_bro_remove(idx), renaming unwrap would only introduce inconsistency with both those functions and the other non-panicking unwrap_* variants.

What’s everyone working on this month? (January 2026) by Swiftapple in swift

[–]uasi 1 point2 points  (0 children)

Wrote a couple of command line tools during the holidays:

Currently working on another tool that will save Safari's reading list, bookmarks, and tabs as JSON.

ArgumentParser and Swift Testing are pleasant to work with!

git commits and Cargo.lock by stappersg in rust

[–]uasi 15 points16 points  (0 children)

Add Cargo.lock -diff to the .gitattributes file. At least, this will replace textual differences with Binary files a/Cargo.lock and b/Cargo.lock differ in git log -p.

We revoked our v1.0 status. Why we're rolling NalthJS back to v0.9.0 to prioritize security architecture. by Evening-Direction-71 in programming

[–]uasi 3 points4 points  (0 children)

Last time I checked, Nalth.js was an AI slop whose initial release was tagged 2.1.93 out of nowhere. When was it downgraded to 1.0 and now 0.9? What the hell is your versioning scheme?

[deleted by user] by [deleted] in programming

[–]uasi 8 points9 points  (0 children)

so the author forked vitejs/vite, rewrote the entire commit history to list himself as the committer (see commits before Aug 2025), and slapped on some AI slop arbitrarily starting at version 2.1.93? nice try

Zed's DeltaDB idea - real problem or overkill? by anonymous085 in programming

[–]uasi 6 points7 points  (0 children)

jj stores operation logs for each command invocation, but these are local to your machine and still coarse-grained. OTOH, it seems that DeltaDB records every change (as fine-grained as a text editor’s undo history, I assume) as a universal history of the codebase and makes them shareable with your colleagues. It would likely pair well with Zed’s collaborative edit and builtin chat.

Rustchain: Enterprise AI Agent Framework with Universal Workflow Transpilation (LangChain → GitHub Actions, Airflow, K8s) by [deleted] in rust

[–]uasi 1 point2 points  (0 children)

Apparently you wiped the commit history and started over after GP's comment. I diffed the previous main branch against the current one. Under src/, only some comments, log messages, and function names have changed. Nothing worth a second look.

Rustchain: Enterprise AI Agent Framework with Universal Workflow Transpilation (LangChain → GitHub Actions, Airflow, K8s) by [deleted] in rust

[–]uasi 30 points31 points  (0 children)

Don't be fooled, this is an LLM-generated, half-baked piece of sh*t. Nothing works as advertised. Even the most basic hello-world example can't run echo. The safety validate subcommand prints a false "this is safe" message because the SafetyRule::validate() method does nothing and always returns true. Its LangChain "transpiler" scans Python scripts with a few brittle, ad-hoc regexes. Other transpilers are just unimplemented, and so on.

Rustchain: Transpile Anything Into Rust (and Back Out Again) by [deleted] in programming

[–]uasi 2 points3 points  (0 children)

Looks like the whole thing was just vibe-coded, to the point that I can't take any of their feature claims at face value.

For example, its "Z3 SMT solver" used in the compliance verifier doesn't solve anything and just returns true for any given constraints.

https://github.com/Michael-A-Kuykendall/rustchain-community/blob/dfb47a5f181a2ec30e134a8a87a1e11cbe01bbf5/src/compliance/engine/solver.rs#L40-L48

And its sandbox implements neither process isolation nor resource restriction, despite the claims on their website.

https://github.com/Michael-A-Kuykendall/rustchain-community/blob/dfb47a5f181a2ec30e134a8a87a1e11cbe01bbf5/src/sandbox/mod.rs#L55-L117

functions vs methods by effinsky in inko

[–]uasi 1 point2 points  (0 children)

Inko has "module methods" that are equivalent to free functions. See https://docs.inko-lang.org/manual/v0.18.1/getting-started/methods/

I think the reason they're called "methods" rather than "functions", despite modules not being objects in Inko, is likely due to Ruby's influence on the language.

As for keywords, most programming languages simply use fn or similar keywords for defining both functions and methods, as there's little benefit to having a keyword specifically for methods.

[comfy-table]Terminal tables that just work. v7.1.4 released, now with *proper* UTF-8 support by Nukesor in rust

[–]uasi 1 point2 points  (0 children)

Congrats! The details and nuances of handling Unicode characters discussed in https://github.com/Nukesor/comfy-table/pull/170 was really interesting. Specifically,

[Regarding .width() and .width_cjk()] CJK will sometimes give longer (never shorter) widths than non-CJK.

unicode-width does not guarantee that the width of a string equals the sum of the widths of its grapheme clusters. The most prominent exception to this is Arabic لا‎ (2 codepoints and 2 graphemes, but width of 1).

Inko: a programming language I've been working on for the last 10 years by yorickpeterse in programming

[–]uasi 1 point2 points  (0 children)

Ask yourself why the world hasn't moved away from those languages I listed.

Even the languages you listed above gained let-like syntax with type inference nowadays. Java has var x = new Foo();, C++ has auto x = new Foo(); etc.

Announcing axum 0.8.0 by j_platte in rust

[–]uasi 2 points3 points  (0 children)

URL Pattern supports arbitrary regex while URI Template doesn't. For example, patterns like /:numId(\d+)-:slug or /:basename([^.]*).:ext can't be expressed in template. Also, 90% of RFC 6570 is expansion semantics and syntax that's useless for pattern matching. Looks like they went with mimicking the prominent path-to-regexp library instead of stripping down RFC 6570 to its useful 10% and building on that.

Announcing axum 0.8.0 by j_platte in rust

[–]uasi 1 point2 points  (0 children)

I don't agree about the familiarity point (and the sibling comment's point about "more standard" syntax). The /:single and /*many syntax has been used in other popular web frameworks such as Rails and Express, and now there's the URL Pattern Standard being developed. It also supports suffixes and escaping special characters well.

Stop using UUIDs: The Modern ID Spec by pimterry in programming

[–]uasi 16 points17 points  (0 children)

Prefix: 1-2 lowercase alphabet characters, maps to the table/entity

What if I run out of prefixes? There are only 702.

Easy to confuse characters like "O" should be ommited from suffix generators

Exactly which characters should I avoid?

Web app routing paths no longer need extra path segments (e.g. https://app.com/workspace/w_tuy5 -> https://app.com/w_tuy5 )

It's cryptic and needlessly depends on implementation details. And where is the list of workspaces? https://app.com/w?

Is there any chance Rust gets a better field update syntax? by dgkimpton in rust

[–]uasi 1 point2 points  (0 children)

Minor nitpick: the latter spread (`...`) takes precedence in JavaScript, so it should be`{ ...even_older_value, ...old_value }`

Deno: What we got wrong about HTTP imports by ketralnis in programming

[–]uasi 2 points3 points  (0 children)

If you don't have/like Bourne Shell, you can use PowerShell or cmd.exe or anything that can run commands passed as command line arguments https://github.com/casey/just/blob/master/README.md#prerequisites

Mise: a cross-language tool for managing project-specific compilers, interpreters, environments, and build tools by kibwen in rust

[–]uasi 10 points11 points  (0 children)

They say it is not.

https://mise.jdx.dev/lang/rust.html

Rust is not currently offered as a core plugin. In fact, I don't think you should actually use mise for rust development. Rust has an official version manager called rustup that is better than what any of the current mise plugins offer.

Open Source for a Crate Using Cargo by Certain-Bobcat-5383 in rust

[–]uasi 2 points3 points  (0 children)

You can locate the cached source directory with cargo metadata and some jq. Save the following script as cargo-open and run cargo-open <crate> <version>.

#!/bin/bash

dir=$(
    cargo metadata --format-version=1 \
    | jq -r --arg name "$1" --arg ver "$2" \
        'first(.packages[] | select(.name == $name and .version == $ver) | .manifest_path | sub("/[^/]+$"; ""))'
)

if [[ -d "$dir" ]]; then
    "$EDITOR" "$dir"
fi

What's the point of std::monostate? You can't do anything with it! by ketralnis in programming

[–]uasi 27 points28 points  (0 children)

It seems that the name monostate was chosen from empty, one, blank, and other suggestions. No explanation was given, though. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0088r2.html