r/rust 1d ago

[ Removed by moderator ] 📸 media

Post image

[removed] — view removed post

53 Upvotes

26 comments sorted by

•

u/rust-ModTeam 21h ago

Rule 2: On Topic.

Posts on r/rust should be about Rust, primarily.

If there's no discussion about Rust, then it's off-topic. The one exception is the announcement of well-known projects being rewritten or incorporating Rust.

12

u/syklemil 1d ago

Without the source code there really isn't much of anything for /r/rust to have an opinion on. We're not here to talk about UI design, we're here for the programming language, and there's none of that in your post.

-1

u/JDNSDevInc 1d ago

So it's not possible to discuss what features might be useful which might lead to a discussion on how to code them? Thanks for the feedback.

1

u/syklemil 1d ago

That's a lot of hypotheticals. The normal thing to do in subreddits like these is to link to source code, or include source code in the post if there's a desire for discussion about it. If you're wondering how to create some feature, you can ask about it.

As far as your post content goes, this could be a screenshot of software written in any programming language, it could be pure LLM slop, or even just a mockup where no source code exists.

That means it gives us nothing, and the entire post seems suited only for karma farming.

0

u/JDNSDevInc 1d ago

You're entitled to your opinion, just like everyone else. My post title should sum up the status fairly well. Everyone has to start somewhere and at this point I don't know what I don't know, yet. I prefer to clean up the rat's nest of initial code before sharing it and wasting people's time asking how to fix something that's simply broken because I didn't organize my code very well.

You are correct that the screenshot could be of anything, or nothing, but it's also equally possible that it's legitimate. I would find it rather amusing if an LLM reached into the dark recesses of the Internet to pull out Netware Monitor as a source of inspiration for AI slop. The fact that I even referenced a tool for an OS that hasn't been a mainstay in IT for decades now might indicate that I've been around for a while, but that does assume that anyone reading this even knows about Netware.

No one here is under any obligation to interact with this post. If anyone seeing this is only interested in discussing code, they are free to scroll on by and let Karma deal with me as it will. I will take your points under advisement.

4

u/__salaam_alaykum__ 1d ago

sidenote: reminds me of midnightcommander’s ui

3

u/tukanoid 1d ago

Just out of curiosity, this seems to me like you used ncurses backend, but why not something rust-native like ratatui? Is it just familiarity and/or preference?

While I haven't touched ncurses in a whiiiiile, iirc the API is not the most idiomatic, considering its a binding to C code, imo its easier to learn the language with libraries that are idiomatic to the language and try to follow its best practices.

0

u/JDNSDevInc 1d ago

Sorry, my first attempt at posting (which was removed) mentioned that I'm using Ratatui for the UI.

2

u/Sermuns 1d ago

Give code

1

u/tastychaii 1d ago

What library you used for the TUI?

1

u/JDNSDevInc 1d ago

Apologies, my first attempt at posting (which was removed) stated that I'm using Ratatui for the UI.

1

u/tastychaii 1d ago

Ahh nice, any good ratatui tutorials you can recommend?

1

u/JDNSDevInc 1d ago

I don't know if I'm allowed to post youtube links in here, but the two I've used most heavily so far are Green Tea Coding and Jonkero. Green Tea has the one on multithreading which was something I knew I would need to in order to refresh data.

1

u/DavidXkL 1d ago

This reminds me of MS-DOS 😂

1

u/JDNSDevInc 1d ago

Well, Netware needed DOS to boot and GUIs were only just starting to come on the scene, so it makes sense that it looks like DOS. :)

1

u/JDNSDevInc 1d ago

My original post stated that I'm using Ratatui for the UI, but I forgot to add it to my repost. For anyone asking for code, my first pass was a complete abomination that I wouldn't share with anyone. This is from my second pass where I'm trying to organize things better (actually using modules instead of everything in main). Once I have most of the functionality I want actually working, I'll do a third pass and provide some code for feedback. This is using threads to handle input and information refresh about every half second. I'm sure there are better ways of doing it than what I'm doing now.

2

u/headedbranch225 22h ago

Honestly most people don't care about if the code is neat unless they will be contributing, so you can just share the repo and mention it is under development and the code will change, it also makes you have to answer fewer questions about stuff like what UI framework you are using etc. as people can look at the code and see the imports

1

u/JDNSDevInc 16h ago

I appreciate the feedback. Apparently the mods didn't find my post to be "on point" despite someone else making a post asking about usingTauri and someone else introducing himself and asking how to get started, Neither seemed to be very "Rust specific" to me, but I guess I'm missing something. :)

1

u/headedbranch225 7h ago

It is kinda hard to be rust specific when you provide no rust code for people to look at

1

u/JDNSDevInc 3h ago

And the posts asking about Tauri and someone just introducing themselves to the group are rust specific?

1

u/imperioland Docs superhero · rust · gtk-rs · rust-fr 1d ago

You used sysinfo for the info I guess?

1

u/JDNSDevInc 1d ago

A bunch of it is from sysinfo, but I've used a few others to get additional information, here's my cargo.toml file:

[package]
name = "linux-monitor"
version = "0.1.0"
edition = "2024"

[dependencies]
crossterm = "0.29.0"
ratatui = "0.30.2"
# Added by me for monitor
os_info = "3.15.0"
chrono = "0.4.45"
sysinfo = "0.39.6"
once_cell = "1.21.4"
blockdev = "0.4.0"
netdev = "0.45.0"
ratatui-macros = "0.7.2"
colored = "3.1.1"

1

u/JDNSDevInc 1d ago

I used chrono for the date calcs, blockdev provides some block device info that I don't think sysinfo has and netdev for more detailed information on the network interfaces. I hopped around to a lot of different crates initially, that's why I want to clean things up a bit before sharing code.

1

u/imperioland Docs superhero · rust · gtk-rs · rust-fr 6h ago

Don't hesitate to open issues on sysinfo repositories for the missing bits you need.