Live data from Hacker News

Show HN: Cot: a Rust web framework for lazy developers

mackow.ski

71–80 of 115 posts

Re: Show HN: Cot: a Rust web framework for lazy developers

#71

Ok(Response::new_html(StatusCode::OK, Body::fixed(rendered))) no thank you. if you like it good for you, for me this looks worse than Body body = BodyFactory.newInstance(BodyConfiguration.OK) which is still SHORTHER and less cancer

Your BodyFactory example isn't even functionally the same as the quoted code snippet. Nowhere is the Body::fixed(rendered) equivalent seen, for example.

Re: Show HN: Cot: a Rust web framework for lazy developers

#72
post #12

Earlier quoted context omitted.

Nah. The query is $slug == LimitedString::new("cot") Also, people like ORMs. Type safety is nice too without having to map manually. Sqlx is also great

> Also, people like ORMs. Type safety is nice too without having to map manually. Sqlx is also great Don't you get type safety anyway with parameterised parameters?

on return values?

Re: Show HN: Cot: a Rust web framework for lazy developers

#74

Ok(Response::new_html(StatusCode::OK, Body::fixed(rendered))) no thank you. if you like it good for you, for me this looks worse than Body body = BodyFactory.newInstance(BodyConfiguration.OK) which is still SHORTHER and less cancer

That's one of the issues explicitly mentioned in the article ("Request Handler API is far from being ergonomic"). This will get better in the nearest future as it's a major pain point, I'm just thinking of the best API for doing request/responses.

Re: Show HN: Cot: a Rust web framework for lazy developers

#77
post #75

I would love a Django clone in Rust that does NOT do async. Dead simple to debug instead of performance oriented.

I just had an issue yesterday in my company where a backend keeps crashing, because a function blocking the main thread, which means that the healthcheck endpoint was not responding... Async is definitely a needs

Re: Show HN: Cot: a Rust web framework for lazy developers

#78
post #75

I would love a Django clone in Rust that does NOT do async. Dead simple to debug instead of performance oriented.

That's actually a very good point. I was thinking a lot about whether to make async a requirement. Given that sync code is often easier to reason about and debug and Cot tries to be developer-friendly, I'm leaning towards "sync by default, async when you need to", but I'll need to explore this more. Thanks for this thought!

Re: Show HN: Cot: a Rust web framework for lazy developers

#79
post #60

What's funny is its obviously in early stages, but its homepage doesn't show an immediate code sample. I find it funny because you are trying to appeal to lazy devs but making them work to get to any code samples. The golden rule for making a website / readme for any programming language, web framework (or even GUI frameworks) is to have at least one or more code samples, so people can see what coding in your framewo…

Good point! I'll add some code samples soon, thanks!

Screenshots of things like the admin panel too.
Post reply on HN