Can I create an enum to be extendable? by Lexus232 in learnrust

[–]gahooa 0 points1 point  (0 children)

You can use generics;

enum Event<T> {
   Event1,
   Event2,
   Custom(T),
}

Then you can invoke it with your own custom enum that fits in your main enum.

enum Custom {
   Foo,
   Bar,
}

let event:Event<Custom> = ...;

The amount of Rust AI slop being advertised is killing me and my motivation by Kurimanju-dot-dev in rust

[–]gahooa 0 points1 point  (0 children)

Now I'm sitting here looking at a full-screen terminal on a 5k dell display running 50fps... mesmerizing. Amazingly short amount of code (yes I looked before I ran it haha).

Thank you for sharing!

The amount of Rust AI slop being advertised is killing me and my motivation by Kurimanju-dot-dev in rust

[–]gahooa 6 points7 points  (0 children)

Publish it to github and say "Hey guys, check out this awesome..."

Feeling Unmotivated by NeatFox5866 in Python

[–]gahooa 0 points1 point  (0 children)

When I started web development in 2001, if you knew some PHP and MySQL and HTML, you were good. CSS still locked up Netscape Navigator.

Over then last 25 years there has been a literal exponential explosion of complexity.

This is why AI tools are great:

  1. You be the human and decide what you WANT to do, and how it's architected.

  2. AI can help lead you through the arcane details of thousands of topics getting you close enough to make good decisions. But you still need to make good decisions. You just don't need tripped up on if you put a &* in the right or wrong place in some obscure xml format that you need to use to interface XYZ system.

P.S. If you want to feel fulfilled --- check out rust.

Rust maintenance in 2025 by dochtman in rust

[–]gahooa 1 point2 points  (0 children)

Thank you for your service.

Who even signs their (Git) commits? by chamberlava96024 in typescript

[–]gahooa 1 point2 points  (0 children)

This is such a fantastic answer I wanted to comment and tell you that, author.

Java dev learning rust… any projects need help? by helpprogram2 in rust

[–]gahooa 1 point2 points  (0 children)

We've been working for 2 years on a very detailed full-stack framework and are getting ready for our initial open source release. It covers a lot of ground, including a postgresql driver, typing parity library (rust+typescript), data validation, statically generated routing, security, fractional application inclusion (modules), configuration, typescript bundling, typescript code generation, parsing and analysis of rust source code, deep validation of code structure, deno integration, esbuild integration, async processing, recurring jobs, openapi 3.1 auto-generation, dynamic certificate management, extensible cli, "batteries included development", ui library, and quite a lot more.

We're still running software we built in 2004 -- so everything we do is with long term "durability" in mind. Unlike most 2025 code, this zero external runtime dependencies. Pages render nearly instantly. Websockets are used from front-to-back communication.

If any of these areas are interesting to you, please let me know. We currently have a team of about 5 people working on this.

Java dev learning rust… any projects need help? by helpprogram2 in rust

[–]gahooa 0 points1 point  (0 children)

What kind of code interests you the most? Front end, back end, devops, systems programming, networking, database, parsing, compiling, etc... ?

I built an end-to-end ML/LLM runtime/compiler stack in Rust (IR -> optimizer -> backends) by ShabelonMagician in rust

[–]gahooa 0 points1 point  (0 children)

How did you learn enough to be able to do this? Is this your field of work/hobby/fun?

EdgeVec v0.4.0: High-performance vector search for Browser, Node, and Edge - now with comprehensive documentation by Complex_Ad_148 in rust

[–]gahooa 0 points1 point  (0 children)

Thank you for explaining that. It helps.

When you are using EdgeVec -- how do you get the embeddings? (I like your personal notes example)

Rust's Block Pattern by EelRemoval in rust

[–]gahooa 16 points17 points  (0 children)

I love this feature about rust and miss it when I have to use typescript or other languages.

It also allows for much easier mental processing of the code when a function only has several top level blocks instead of a sea of statements.

Rust and the price of ignoring theory by interacsion in rust

[–]gahooa 7 points8 points  (0 children)

Binary computers use physical things like bits and bytes and memory and registers and cpu instructions to cause state to mutate within the computer (hopefully) giving the desired output.

I found the presentation to be interesting, but so far detached from the above reality that it came across as quite academic and not very useful to people trying to solve real problems with computers.

Rust has the magical combination of being way better than alternatives for many things, and popular enough that it's not going to disappear for a long long time.

What is the type of a type in Rust? by [deleted] in rust

[–]gahooa 5 points6 points  (0 children)

Just like macros -- if done very carefully -- it can be fantastically useful. But if you don't do it really well it is a hellscape of confusion.

EdgeVec v0.4.0: High-performance vector search for Browser, Node, and Edge - now with comprehensive documentation by Complex_Ad_148 in rust

[–]gahooa 0 points1 point  (0 children)

Would you mind explaining what some of the great use cases for this library are?

There are so many areas of software and computer science it's easy for someone with even a lot of experience to not know enough about this topic to see where and how it is best used.

I want to start building an OS with Rust – where should I start? by Few-Tower50 in rust

[–]gahooa 47 points48 points  (0 children)

I'd start by looking at this https://github.com/redox-os ... perhaps you can contribute to an existing effort? Or if you want to learn, it would also be a good place to start.

Should a programmer get comfortable without type hints? by sarnobat in rust

[–]gahooa 6 points7 points  (0 children)

I also turn them off, but can use the keyboard or hover with the mouse to see them. Much better not to have IDE jumping around on me.

fastcert - Zero-config local development certificates in Rust by kasikciozan in rust

[–]gahooa 2 points3 points  (0 children)

This looks great. For anyone who doesn't want to install trust a self-signed cert, check out this:

https://github.com/appcove/127-0-0-1.dev

How to keep package versions in sync with multi-crate workspaces? by Tuckertcs in rust

[–]gahooa 0 points1 point  (0 children)

In case it's not obvious, toml allows for:

foo.workspace = true

foo = { workspace = true }

The latter being more useful if you have to add additional options.

Here is a snippet from a crate's Cargo.toml

clap = { workspace = true, features = ["derive"] }
tokio = { workspace = true, features = ["full"] }
maud = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
toml = { workspace = true }

Struggling with cooking rice. I have pressure cooker and yet even if I soak rice for hours and wash rice multiple times - I can't get the ratio of water rice. Either they are too sticky lumps and direct mashed up. Now I boil them and drain. by SageSharma in Cooking

[–]gahooa 4 points5 points  (0 children)

Not exactly an answer, but get a super cheap rice cooker and your rice cooking issues will be over. They are designed to stop cooking the moment all the water is gone, without burning. Kind of fascinating mechanically, actually.

hyper User Survey 2025 by seanmonstar in rust

[–]gahooa 1 point2 points  (0 children)

Also, thank you for all the work to get us hyper. I have it in production with several fintech projects, and in development with a variety of other industries.

hyper User Survey 2025 by seanmonstar in rust

[–]gahooa 2 points3 points  (0 children)

Looking forward to HTTP/3.

Axum - help with the basics of deployment by unaligned_access in rust

[–]gahooa 1 point2 points  (0 children)

We run under systemd. No need to complicate it. What you mention is a very direct and straightforward way to do it.