Live data from Hacker News

Cot: The Rust web framework for lazy developers

cot.rs

41–50 of 71 posts

Re: Cot: The Rust web framework for lazy developers

#41
post #29
post #25

Earlier quoted context omitted.

> Rust is not a language for lazy developers. I am one, and Rust absolutely can be. > Lazy developers won't fight with the borrow checker. You don't fight the borrow checker when writing web code. The request flow is well suited for rarely, if ever, testing the borrow checker. > Instead, think more critically about why a Rust developer would need a web framework The same reason anyone would need a web framework. Anyt…

It's absolutely not true, the moment you're out of http hello word, and you have more serious logic about data that you need to manipulate / modify you will fight the borrow checker, that's why a lot of people do a lot of rc / arc refcell. And then the async implementation.

I would have thought async would be the biggest problem.

Re: Cot: The Rust web framework for lazy developers

#42
post #26
post #17

Earlier quoted context omitted.

Rust already has several server frameworks that are relatively low-level network plumbing, and leave figuring out everything else to the user. If that's what you like, you can pick and choose from all the existing tools. The Rust's ecosystem is now missing its Rails or Django. This is an attempt to make something for those "lazy" devs who don't want to write their own cookie parsing middleware, and figure out how to…

> Rust already has several server frameworks The incredible proliferation of Rust web frameworks should be an almost blinding beacon advertising how well-suited Rust is for web backend development. The biggest takeaway that anyone new to Rust or new to Rust-on-backend should have: Rust absolutely rocks for backend development. It's getting a tremendous amount of attention, people are trying a lot of things, and it's…

> For anyone scared of Rust or the borrow checker: due to the nature of HTTP services and request flow logic, you almost never bump into it when writing backend Rust.

I’d say for anyone worrying about it just use ‘clone()’ everywhere you can. If you’re coming from any interpreted language the performance and efficiency will just be so much better that it doesn’t matter.

Re: Cot: The Rust web framework for lazy developers

#43
From the FAQ:

> “Cot” is pronounced similarly to a Polish word “kot”, which means “cat”. Cats are known for their agility and flexibility, and also this is where the logo comes from.

Also, if I might add, the author's last name (Maćkowski) seems to be related to the word used for "cat" in several Slavic languages (e.g. Croatian: https://hr.wikipedia.org/wiki/Doma%C4%87a_ma%C4%8Dka), though apparently not in Polish...

Re: Cot: The Rust web framework for lazy developers

#44
post #12

I really wish Rust projects would stop using the term "blazing speed". It is almost like a meme already. You can write slow code in Rust pretty easily, so speed is something extra. And I am a Rust developer... Seeing this term makes me cringe every time.

Ditto for "type safety". This always feels like reaching for onnnne more feature on these project hype sites. "I don't expose the public API as Any!" feels about on the level of "has documentation"... which they also pitch as a feature.

I’ve read the term “type-safe HTML” somewhere, still have no idea what that means.

Re: Cot: The Rust web framework for lazy developers

#45
post #29
post #25

Earlier quoted context omitted.

> Rust is not a language for lazy developers. I am one, and Rust absolutely can be. > Lazy developers won't fight with the borrow checker. You don't fight the borrow checker when writing web code. The request flow is well suited for rarely, if ever, testing the borrow checker. > Instead, think more critically about why a Rust developer would need a web framework The same reason anyone would need a web framework. Anyt…

It's absolutely not true, the moment you're out of http hello word, and you have more serious logic about data that you need to manipulate / modify you will fight the borrow checker, that's why a lot of people do a lot of rc / arc refcell. And then the async implementation.

Show me what you find to be hard, because I don't believe you.

None of what you've described is hard. It's quite approachable, and an IDE with an LLM practically autocompletes everything for you anyway.

If you can write Java or Go, you can absolutely write Rust.

Re: Cot: The Rust web framework for lazy developers

#46
post #29

Earlier quoted context omitted.

It's absolutely not true, the moment you're out of http hello word, and you have more serious logic about data that you need to manipulate / modify you will fight the borrow checker, that's why a lot of people do a lot of rc / arc refcell. And then the async implementation.

I would have thought async would be the biggest problem.

If you're in a web framework, all the handlers are async already. You have literally no work to do.

Re: Cot: The Rust web framework for lazy developers

#47
post #42
post #26

Earlier quoted context omitted.

> Rust already has several server frameworks The incredible proliferation of Rust web frameworks should be an almost blinding beacon advertising how well-suited Rust is for web backend development. The biggest takeaway that anyone new to Rust or new to Rust-on-backend should have: Rust absolutely rocks for backend development. It's getting a tremendous amount of attention, people are trying a lot of things, and it's…

> For anyone scared of Rust or the borrow checker: due to the nature of HTTP services and request flow logic, you almost never bump into it when writing backend Rust. I’d say for anyone worrying about it just use ‘clone()’ everywhere you can. If you’re coming from any interpreted language the performance and efficiency will just be so much better that it doesn’t matter.

That's an excellent way to get your footing. And you can come back in a month and fix it all easily.

Re: Cot: The Rust web framework for lazy developers

#49
post #36

Earlier quoted context omitted.

Heterogeneous selects are just not possible to do in a cross-platform manner, without async/await. Rust is one of the very few environments which lets you do them in a reasonable manner -- the other alternatives are a nest of threads or a hand-written message loop-based state machine, both of which don't scale well as complexity goes up.

https://crates.io/crates/mio

Right, which (if you use it without Tokio) means you're managing a message loop by hand. Doesn't quite scale up to state machines with 50+ states.

Re: Cot: The Rust web framework for lazy developers

#50
post #36

Earlier quoted context omitted.

https://crates.io/crates/mio

Right, which (if you use it without Tokio) means you're managing a message loop by hand. Doesn't quite scale up to state machines with 50+ states.

> Doesn't quite scale up to state machines with 50+ states.

It is a lot of lines of code, but simple.

It is the easy thing.

Post reply on HN