Live data from Hacker News

Cot: The Rust web framework for lazy developers

cot.rs

31–40 of 71 posts

Re: Cot: The Rust web framework for lazy developers

#32
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’m writing a web app at work and I have one Arc and no Rc or RefCell.

Got zero because I cheated with Box::leak

Re: Cot: The Rust web framework for lazy developers

#33
post #23
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…

Opinionated frameworks are very useful. They create well-worn paths that others have tried before. Every python flask environment I've ever seen has been a bespoke configuration with some selection of the massive combinatoric space that flask presents to folks. Contrast that with python Django or Ruby on Rails where opinions abound, but you can escape the well worn path if you _need_ to.

In my experience, most people who say “we don’t need no stinkin’ framework” end up basically inventing their own framework. Most of the time, it’s also just flat out worse.

As such, my initial gut reaction is to quell the NIH syndrome.

Re: Cot: The Rust web framework for lazy developers

#35
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…

Backend development is all about data storage and retrieval. It's no coincidence that the most celebrated backend frameworks of all time developed best-in-class ORMs for their respective languages. Being able to define a single structure that defines how data moves all the way through the stack is incredibly powerful and opens up development optimizations that simply don't happen when mixing boutique libraries.

Re: Cot: The Rust web framework for lazy developers

#36
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…

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

Re: Cot: The Rust web framework for lazy developers

#37
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 personally like to explicitly know beforehand if a JavaScript or Python package comes with type annotations, which is not a given.

Re: Cot: The Rust web framework for lazy developers

#38
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…

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.

That article assumes that there needed to be language level support for asynchronous programming, beyond non-blocking operations.

My point is that that is not true.

If you want to use the blocking paradigms for asynchronous programming, then yes, there does need to be some magic added to make it work.

If, however, you are comfortable with asynchronous programming (and it is not hard) then all you need are the non-blocking operations.

Re: Cot: The Rust web framework for lazy developers

#39
post #23
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…

Opinionated frameworks are very useful. They create well-worn paths that others have tried before. Every python flask environment I've ever seen has been a bespoke configuration with some selection of the massive combinatoric space that flask presents to folks. Contrast that with python Django or Ruby on Rails where opinions abound, but you can escape the well worn path if you _need_ to.

Honestly as someone who has been building Rails applications for over 15 years now, I find far too many people think they are special and need to stray from the defaults.

Re: Cot: The Rust web framework for lazy developers

#40
post #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…

There’s https://loco.rs/ if you like that sort of Rails experience. Personally I’ve grown more fond of having little cruft in my apps, being “lazy” about what goes into the code isn’t right to me and many of these frameworks don’t really care about that. To me most of the value in these opinionated frameworks is in the scaffolding anyway, not the opinions.
Post reply on HN