Live data from Hacker News

Cot: The Rust web framework for lazy developers

cot.rs

11–20 of 71 posts

Re: Cot: The Rust web framework for lazy developers

#11
post #6

I am too lazy to deal with Async at this time.

I do not understand how async/await got introduced into a language with no garbage collector. The mountains Rust has to move, in invisible magical ways, to get the tokio runtime to work without a garbage collector is deeply disturbing (`pin` anyone?) I do not understand that if you are happy to have an invisible runtime run your programme why you do not want a garbage collector? But what gets me most is that asynchro…

> I do not understand that if you are happy to have an invisible runtime run your programme why you do not want a garbage collector?

Because a garbage collector does not have an invisible runtime: The memory model is tightly coupled with the garbage collector. This is not zero-cost. All garbage collection comes with some cost; although for many kinds of programming it's so "worth it" that we don't need to consider alternatives.

As someone who's spent most of my career using garbage collected languages; I both appreciate the advantages that come with the tradeoffs of garbage collection; and the tradeoffs that come with Rust. Rust has no runtime memory management overhead, and no complicated framework to ship.

I still personally don't understand "why" async Rust is so hard. I struggled trying to use it, but at the time I was such a Rust novice that I "didn't know what I didn't know." Yes, async Rust would be easier if the language was garbage collected; but that defeats the point of Rust.

Re: Cot: The Rust web framework for lazy developers

#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.

Re: Cot: The Rust web framework for lazy developers

#13
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.

It is an actual intentional meme, not “almost like” one.

Re: Cot: The Rust web framework for lazy developers

#14
post #6

I am too lazy to deal with Async at this time.

I do not understand how async/await got introduced into a language with no garbage collector. The mountains Rust has to move, in invisible magical ways, to get the tokio runtime to work without a garbage collector is deeply disturbing (`pin` anyone?) I do not understand that if you are happy to have an invisible runtime run your programme why you do not want a garbage collector? But what gets me most is that asynchro…

Jesus fucking christ not this again.

https://without.boats/blog/why-async-rust/

There are entire articles explaining precisely why. Your lack of knowledge contributes very little to an article about a framework.

Re: Cot: The Rust web framework for lazy developers

#15
post #11
post #6

Earlier quoted context omitted.

I do not understand how async/await got introduced into a language with no garbage collector. The mountains Rust has to move, in invisible magical ways, to get the tokio runtime to work without a garbage collector is deeply disturbing (`pin` anyone?) I do not understand that if you are happy to have an invisible runtime run your programme why you do not want a garbage collector? But what gets me most is that asynchro…

> I do not understand that if you are happy to have an invisible runtime run your programme why you do not want a garbage collector? Because a garbage collector does not have an invisible runtime: The memory model is tightly coupled with the garbage collector. This is not zero-cost. All garbage collection comes with some cost; although for many kinds of programming it's so "worth it" that we don't need to consider al…

Just to follow up a bit:

Rust excels at things like command-line utilities, or high-performance libraries (that don't require you to suck in a whole framework.) In these cases, the case for "async" isn't strong, because chances are there isn't enough concurrent IO to for async vs threaded to make a difference.

If you're making a web application, chances are you're hosting it yourself. Thus, you don't have to "ship" your software and compel your users to load up whatever framework(s) you choose. IE, you can choose to use C# or Node.js, and decide that it's worth your time to spend more on hosting.

Re: Cot: The Rust web framework for lazy developers

#16
post #6

I am too lazy to deal with Async at this time.

I do not understand how async/await got introduced into a language with no garbage collector. The mountains Rust has to move, in invisible magical ways, to get the tokio runtime to work without a garbage collector is deeply disturbing (`pin` anyone?) I do not understand that if you are happy to have an invisible runtime run your programme why you do not want a garbage collector? But what gets me most is that asynchro…

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.

Re: Cot: The Rust web framework for lazy developers

#17
post #7

> ORM integration I don't trust a web framework that's opinionated about how I use my database. It's very hard to get a web framework right, and it's very hard to get an ORM right. Getting both right is nearly impossible. In a situation like this, try to be the best web framework you can be, and then gravitate towards whatever ORM(s) becomes popular. Take a look at Express for Node.js. It's my favorite web framework…

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 get a database connection pool working with a request router.

Re: Cot: The Rust web framework for lazy developers

#18
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.

> And I am a Rust developer... Seeing this term makes me cringe every time.

I write blazingly fast statically allocated Rust on my Arch Linux Thinkpad, btw.

Re: Cot: The Rust web framework for lazy developers

#19
post #7

> ORM integration I don't trust a web framework that's opinionated about how I use my database. It's very hard to get a web framework right, and it's very hard to get an ORM right. Getting both right is nearly impossible. In a situation like this, try to be the best web framework you can be, and then gravitate towards whatever ORM(s) becomes popular. Take a look at Express for Node.js. It's my favorite web framework…

Iterators, type safety, built-in CI & CD & Linting, and the borrow checker are exactly for lazy developers in my opinion.

Who wants to fight with C?Make Bazel Ninja?

Re: Cot: The Rust web framework for lazy developers

#20
post #7

> ORM integration I don't trust a web framework that's opinionated about how I use my database. It's very hard to get a web framework right, and it's very hard to get an ORM right. Getting both right is nearly impossible. In a situation like this, try to be the best web framework you can be, and then gravitate towards whatever ORM(s) becomes popular. Take a look at Express for Node.js. It's my favorite web framework…

Iterators, type safety, built-in CI & CD & Linting, and the borrow checker are exactly for lazy developers in my opinion. Who wants to fight with C?Make Bazel Ninja?

[deleted]
Post reply on HN