Live data from Hacker News

Rust needs a web framework

ntietz.com

331–340 of 395 posts

Re: Rust needs a web framework

#331

Earlier quoted context omitted.

While Rocket was one of the earliest Rust frameworks that really pushed for good UX (via proc-macros), I think it has largely fallen out of favor in many parts of the community. For a very long time it required nightly Rust versions to build, which is a no-go for many people wanting to use a framework in a production setting. Also for a period of ~2 years it was stuck in a 0.5.0 release candidate limbo where the late…

When I asked them about that 2 year limbo, they said the release candidate was feature complete, and simply had incomplete documentation (also some plans for a new management structure). So, it wasn't actually lagging, it had that async for quite some time... But yeah, being in a "release candidate" did scare people off.

That is a bit telling on how the maintainers view their users, i.e. unseriously.

Re: Rust needs a web framework

#332

Earlier quoted context omitted.

When I asked them about that 2 year limbo, they said the release candidate was feature complete, and simply had incomplete documentation (also some plans for a new management structure). So, it wasn't actually lagging, it had that async for quite some time... But yeah, being in a "release candidate" did scare people off.

That is a bit telling on how the maintainers view their users, i.e. unseriously.

Can you elaborate? They seemed pretty responsive to me every time I asked for assistance in the channel... (we'd implemented something in 0.4). If "incomplete documentation" is "unserious" that would be the large majority of open source libraries. Actually blocking on completing it sounds like they were taking the release seriously to me. And I understand it taking a while. No one likes writing documentation.

Re: Rust needs a web framework

#333

"Right tool for the right job," no? Learn multiple languages. The whole "I want to do everything in the language I already know" is why the least interesting--and straight-up pretty terrible albeit very capable--languages are dominating our field.

But surely "making silly things" in Rust counts as learning Rust? I remember writing a 2.5D "Doom style" renderer thing that let you move around in a bunch of rooms/corridors in real time in MacPerl/Quickdraw back in the Mac OS9 and Perl4 days. Probably taught me more about Perl than I'd learn in several years doing it for a job.

For sure, but the article is from the perspective of knowing Rust and wanting to work around, well, Rust. I'm saying if that's what you want, use a language suited for that. Variety is a good thing.

Re: Rust needs a web framework

#334

If you want to make a silly, minimal effort hobby project simply don't use Rust. I'm gonna be honest I don't understand this entire genre of using extremely complex, highly optimized systems languages for tools that don't need them. Your flow chart should basically go like this: "Do I need zero cost abstractions because I'm writing a computationally expensive very serious project?" If the answer is no use a garbage c…

No the flowchart is more like this

1. Do I like the language enough to use it for fun? (no: go to (2))

2. Am I neutral towards the language? (no: go to (3))

3. Am I fine with other people using it for fun? (no: go to (4))

4. Feel free to harangue people who explicitly say they are using it for fun if their reasons for using it is not a 100% utilitarian (which is very likely to be the case: refer to the for fun section)

Re: Rust needs a web framework

#335
post #10

> I like to make silly things, and I also like to put in minimal effort for those silly things. I also like to make things in Rust… I think this part is perhaps the silliest part of a very silly article. If you really like to put in a minimal effort then why on earth would you use Rust? If you want efficiency, memory management and a compiled modern language just use Go. Then you won’t even need anything but the stan…

> I think this part is perhaps the silliest part of a very silly article. If you really like to put in a minimal effort then why on earth would you use Rust?

“I like to play basketball but tbh I like to put in the minimal effort”

“Then why do you even play basketball? It’s a physical activity…”

The first thing takes precedence over the other.

> If you want efficiency, memory management and a compiled modern language just use Go. Then you won’t even need anything but the standard library for what you want to do. Or… use Django as you suggest?

Just do what someone else dictactes. The surefire way to self-expression and Fun Town.

> Yes, yes we use Rust in production because we thought it would be easier (well safer) to teach to interpreted language OOP developers than c/c++ but why on earth would you ever use it for the web unless you are a member of the cult?

You forgot to capitalize. The Cult. Since you apparently want to look silly.

There’s a difference between what you do in production (at a job presumably) compared to what someone does to be “silly”.

Re: Rust needs a web framework

#336
post #97

Earlier quoted context omitted.

> Worrying about lifetimes Again, not my experience at all. I simply don't think about any of that stuff when I write Rust, all my mental energy can safely go towards working on whatever I'm building. If you don't believe me, you're welcome to watch the literally hundreds of hours of me live coding in Rust on YouTube.

> Again, not my experience at all. I simply don't think about any of that stuff when I write Rust Your subjective perception is not reality. You have to think about it, or your programs will be incorrect. The mental load may be low to an experience Rust programmer, but it is there, and it's very intrusive to Rust beginners like myself. > If you don't believe me, you're welcome to watch the literally hundreds of hours…

> Your subjective perception is not reality.

A self-whoosh? I'd consider myself a Rust beginner (e.g. I've completed Rustlings, I have written a handful data parse and transform programs on my own and a couple of web servers to benchmark stuff, nothing grandiose) and lifetimes haven't ever gotten in my way, they usually get automatically inferred or the compiler tells you what is wrong and how to fix it. Most code examples and docs I've worked with, like Rust By Example, Rust Cookbook, even Rocket's docs, don't even feature code with a lifetime annotation or they don't really need you as a developer to do anything with them other than copy and paste if necessary. This is the smallest hill to die on.

Re: Rust needs a web framework

#337

Earlier quoted context omitted.

That is a bit telling on how the maintainers view their users, i.e. unseriously.

Can you elaborate? They seemed pretty responsive to me every time I asked for assistance in the channel... (we'd implemented something in 0.4). If "incomplete documentation" is "unserious" that would be the large majority of open source libraries. Actually blocking on completing it sounds like they were taking the release seriously to me. And I understand it taking a while. No one likes writing documentation.

I’m viewing it from the perspective of being a user who is blocked by a feature or bug fix that has been implemented for 2 years and not released. How do you trust the feature/bug fix cadence moving forward?

It’s not like users can’t run release candidates in prod, but there are many reasons not to, and good policy guides against this.

I used to be an ardent supporter of Uber’s h3 geospatial library. But we’re running into almost exactly the same issue. Bug impacting us we’re fixed in 4.0 and it’s been stuck in release candidate status for over 2 years. That’s not tenable as a user who is trying to get things done. So now we’re migrating off it entirely.

Re: Rust needs a web framework

#338

Take F# for a spin. It offers nearly all of the type system tomfoolery one craves and all the tooling and nice-to-haves one wants. The big drag is that the async story and memory management aren't as big as a time vampire as Rust, so you do run the risk of actually solving business needs. I am sure some part of dealing with Microsoft can fill that void, though.

I've been on the fence w.r.t giving it a try. How does it compare to Ocaml and haskell?

From a web point of view, you get full access to .NET, all the associated packages, and all the tooling. You start with a huge head start as opposed to Ocaml and haskell for that usecase.

Re: Rust needs a web framework

#339
post #87
post #10

> I like to make silly things, and I also like to put in minimal effort for those silly things. I also like to make things in Rust… I think this part is perhaps the silliest part of a very silly article. If you really like to put in a minimal effort then why on earth would you use Rust? If you want efficiency, memory management and a compiled modern language just use Go. Then you won’t even need anything but the stan…

I am a fan of Rust for systems programming, but so many people are using Rust for things that are nothing even remotely close to systems programming. So many projects you see being written (or rewritten) in Rust are projects where I just think 'wait, why can't this just have a GC'? And then you look at the code base, and it's all Arc >s, and you can't help at marvel at this, since that's just GC, so what's the benefi…

> Rust is great, but - heretic idea - not literally everything needs to be in Rust. Go try Ruby on Rails for a while! Or - if Rust has whetted your appetite for more functional styles - Phoenix on Elixir! Yes, it's not quite so blazing fast, but - let's be honest here - you're not going to be getting billions of requests per second on your hobby website where you write about taking apart Amigas. It's OK! She'll be right.

Who changes their minds about what to do for fun because someone on HN thought it was unnecessary? Doing what some random person wants instead because they want to be “heretical” (because it’s a religion right) sounds like the opposite of fun to me.

But I’ll see you on the next thread about making a Rube Goldberg web server in C++ templates. Or some such very necessary and “approved for prod by HN” thing.

Re: Rust needs a web framework

#340
post #251

Earlier quoted context omitted.

> But it also is so much more (and also a cult). Way to lose readers with memeish statements like that. That said it's in good company of cultists like Smalltalk and Lisp community ;) > * Its "oop" model is uncomfortable at first (coming from Ruby and Java) It's OOP in the sense it has polymorphism, and "methods" . It's not OOP in almost every other conceivable way. It doesn't fit with static OOP of Java. It doesn't…

Rust to me looks a bit like Java. "One owner per resource" is Rusts "One class per file". I am not convinced that the mental overhead justifies the memory safety guarantees yet. At least for a general purpose language. I didn't yet write a lot of Rust, perhaps more experience trivializes Rusts ownership model.

> "One class per file".

Wait. What? Neither Java nor Rust limit class/struct per file. You must mean public class per file.

As a fellow Java dev, no it doesn't look like Java at all. Maybe it looks a bit like Kotlin, but only superficially.

I wrote Rust on and off for 5 years, by that time you internalize the borrow checker.

Post reply on HN