Live data from Hacker News

Show HN: ut – Rust based CLI utilities for devs and IT

github.com

41–50 of 66 posts

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#41

Earlier quoted context omitted.

uutils/coreutils has a `base64` in Rust which just gained better performance due to the base64-simd crate for SIMD: https://github.com/uutils/coreutils/pull/8578

Note that uutils does not work if the file does not fit into memory. With GNU coreutils: $ base64 /dev/zero | head -c 1 | wc -c 1 With uutils doing the same would exhaust your systems memory until either it freezes or oomd kills the process.

For now. There's no reason this won't/can't be worked on in the future.

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#42
post #39
post #30

I can understand why people would find `ut` convenient. That said, I would caution against trying to include too much functionality. What is too much? I don't have a clear idea on this yet. But I would probably argue that including HTTP functionality is going too far. Why? Because there are already amazing tools dedicated to this already. On the client side, see `xh` [1]. On the server side, see `miniserve` [2]. Both…

I agree. this tool feels like an all-in-one swiss knife. granted, it is useful. But it goes directly against one of the UNIX core values which is "do one thing and do it well". as well, including too much functionality in one single package will eventually bloat it, and there are many examples of this happening (windows, systemd, etc.).

I feel that the applicability of the "do one thing and do it well" philosophy scales with the frequency with which you expect to do that thing and the complexity of the task. In the case of a text editor or a VCS it obviously makes sense. In the case of tools that I use a couple times a year like these, having them all grouped together under a 'misc' application is exactly what I need in order to waste time fumbling through my installed apps trying to remember where I left the QR code generator.

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#43
post #4

Slightly odd suggestion: package it up as both a Python and an NPM module - both just thin wrappers around the combined binary - and then people within those ecosystems will be able to run: uvx ut md5 ... Or: npx ut md5 ... To execute it without having to figure out cargo or how to add a Rust binary to their path. I've seen a few tools do things like this recently, it's a pretty interesting pattern. I believe there's…

I will personally never want to install uvx or npx.

Another suggestion is to enable cargo-binstall, it allows just to install cargo binaries conveniently, and cargo-binstall is just a single-binary to install itself.

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#44
post #33
post #30

I can understand why people would find `ut` convenient. That said, I would caution against trying to include too much functionality. What is too much? I don't have a clear idea on this yet. But I would probably argue that including HTTP functionality is going too far. Why? Because there are already amazing tools dedicated to this already. On the client side, see `xh` [1]. On the server side, see `miniserve` [2]. Both…

I maintain a Rust-based CLI HTTP server that embeds Nushell. It’s a handy little Swiss-army knife that’s replaced Nginx and Caddy for my personal projects. You can serve a folder of static assets like this: http-nu :3021 '{|req| .static "www" $req.path}' https://github.com/cablehead/http-nu

I was looking to try something like this (without the nushell...), but I find that I always have caddy installed anyway, and for the really local cases I use php -S.

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#45

Thanks for disclosing your use of GenAI, that kind of transparency is nice to see up front. On that note though, I took a random example (`calc.rs`) and noticed there was no unit or integration testing validating the parsers or etc. did what was expected of them, or that the end results were correct. Are tests for these tools planned? I get sketched out a bit when I see GenAI code with no automated validations, but I…

Hey, yeah, fair concern. Some tools already have tests, but, I do plan on adding it to all of them.

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#46
post #28

On what basis are new features included? Has the creator thought about the definition of "done"? Will it grow indefinitely like a katamari ball? [1]: https://en.wikipedia.org/wiki/Katamari

I don't have a strict idea of "done" for ut. But, I am not keen on adding increasing complex things to it either. It's purpose is convenience not exhaustiveness.

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#47
post #39
post #30

I can understand why people would find `ut` convenient. That said, I would caution against trying to include too much functionality. What is too much? I don't have a clear idea on this yet. But I would probably argue that including HTTP functionality is going too far. Why? Because there are already amazing tools dedicated to this already. On the client side, see `xh` [1]. On the server side, see `miniserve` [2]. Both…

I agree. this tool feels like an all-in-one swiss knife. granted, it is useful. But it goes directly against one of the UNIX core values which is "do one thing and do it well". as well, including too much functionality in one single package will eventually bloat it, and there are many examples of this happening (windows, systemd, etc.).

I see this more like `busybox`, where being a single binary is an implementation detail. The commands are still orthogonal and composable.

Re: Show HN: ut – Rust based CLI utilities for devs and IT

#48
post #4

Slightly odd suggestion: package it up as both a Python and an NPM module - both just thin wrappers around the combined binary - and then people within those ecosystems will be able to run: uvx ut md5 ... Or: npx ut md5 ... To execute it without having to figure out cargo or how to add a Rust binary to their path. I've seen a few tools do things like this recently, it's a pretty interesting pattern. I believe there's…

+1 for this great suggestion
Post reply on HN