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.
Doesn’t f# require the .net virtual machine though? Most people I know picking rust like the fact that it’s compile to native code “always” and predictability and lack of random time of recovery from garbage collection
Rust needs a web framework
381–390 of 395 posts
Re: Rust needs a web framework
#382Earlier quoted context omitted.
> URL redirection Erm, just return a new url after the match? Get fancy with state machine like enums? Rust has everything you need here, not getting why you think this requires a framework. > Specific management of [...] again, match for that, map your url parts, whatever - it doesn't need a 10,000 pound gorilla when it can be done in a line or two of code > complex regex matching erm, regex crate? > Django, Laravel…
> Rust has everything you need here, not getting why you think this requires a framework. Because you're reinventing a wheel that doesn't need reinvention, and the most likely thing is that you will neither reinvent it nor pick the best library that an opinionated framework with hundreds of eyeballs has. > again, match for that, map your url parts, whatever - it doesn't need a 10,000 pound gorilla when it can be done…
Having used Spring has convinced me that framework popularity has no correlation with quality.
Re: Rust needs a web framework
#383What make rust better than any language when the bottleneck is the network or the database?
I also think people underestimate how much impact their slow code has even in networked applications.
Re: Rust needs a web framework
#384Doing my web stuff in Rust was fine but concurrency was a pain. A crate that abstracts web workers with transferrable types would help. After that you have to pick a component library of which there are few, and all are experimental. Making pretty, performant things is hard. Switching compontent libraries isn't easy. The backend stuff is a breeze, I think Rust is doing fine there. I'm switching to Flutter for my UX n…
> I stayed away from Flutter at first because it doesn't respect the DOM etc but at this point I'm willing to sell my soul to the devil for how easy it is to make a great UX that deploys anywhere. Great UX, you say? Great UX!? Flutter’s unashamed pure-canvas approach makes it fundamentally and unfixably awful. Links don’t work because they’re fake (and it’s impossible to fake them), scrolling is atrocious for a signi…
There are a couple of options. While not first party, there is this solution for example: https://pub.dev/packages/jaspr
Here’s the difference between jaspr and Flutter Web explained: https://docs.page/schultek/jaspr/jaspr-vs-flutter-web
There’s another package, static_shock, although it’s purpose is to build static websites. The author was part of the Flutter team.
Article: https://blog.flutterbountyhunters.com/you-can-now-generate-s....
Re: Rust needs a web framework
#385Earlier quoted context omitted.
> I stayed away from Flutter at first because it doesn't respect the DOM etc but at this point I'm willing to sell my soul to the devil for how easy it is to make a great UX that deploys anywhere. Great UX, you say? Great UX!? Flutter’s unashamed pure-canvas approach makes it fundamentally and unfixably awful. Links don’t work because they’re fake (and it’s impossible to fake them), scrolling is atrocious for a signi…
Regarding that last sentence, it’s possible to have a DOM and yet still write it in Flutter. There are a couple of options. While not first party, there is this solution for example: https://pub.dev/packages/jaspr Here’s the difference between jaspr and Flutter Web explained: https://docs.page/schultek/jaspr/jaspr-vs-flutter-web There’s another package, static_shock, although it’s purpose is to build static websites.…
In Dart, that is; not Flutter. At that point, you’re probably wasting your time advocating for it, because people are mostly choosing Dart because of Flutter, so if you’re not using Flutter, you might as well use a different language.
Re: Rust needs a web framework
#386Earlier quoted context omitted.
> How did a language that's supposed to be so hard get popular to the point where people view its fans as pushing it aggressively? Popular languages don't really have evangelism or fans pushing it aggressively. Those are traits of smaller languages that don't interop well with other ecosystems so they need a lot of evangelism to build out the library ecosystem. > there's a space for a higher-level language with most…
> Those are traits of smaller languages that don't interop well with other ecosystems so they need a lot of evangelism to build out the library ecosystem > What non-memory management related things is it people like from Rust that is missing from, say, Java or Kotlin? I'd argue that Rust has better interop with C, C++, JavaScript, Python, Ruby, and probably almost every other non-JVM language than Java and Kotlin. I'…
You can call into JS, Python, Ruby and other such languages from Java like this:
https://github.com/graalvm/graal-languages-demos/blob/main/g...
It's very easy and requires no build-time bindings generation or Python/JS/Ruby runtimes to be installed. You can add Pip dependencies via the Java build system you use, as if they are regular libraries. It will also JIT compile the different languages together as one so the boundaries are optimized, you get transparent exceptions, callbacks work transparently as the whole heap is GCd as one, you can using a debugger in a unified way across languages and so on.
But this is sort of beside the point. Java once had lots of evangelism, partly to help build out the library ecosystem, but that was done years ago and now there are lots of libraries to meet most needs. So as a consequence you don't hear about it as much. This thread is a case in point. Lots of people suggesting rarely used languages like O'Caml or Zig, nearly nobody suggesting more obvious candidates that are used for this task, every day by nearly every big company in the world.
> I'm not sure why you think that getting people to write more libraries is the goal of evangelization; if anything, I think Rust is somewhat notorious for people writing lots of libraries but comparatively fewer full applications.
Wouldn't that be expected then? Rust has had lots of evangelism which has successfully yielded lots of libraries?
> handling dependencies and building an application that you can run outside of an IDE are not nearly as straightforward in Java as plenty of other languages nowadays.
I think this may be based on an outdated idea of how things work nowadays. I have my beefs with Java build tools but if you just want to build and distribute a web app it's easy. Using the stack I'm most familiar with:
1. Starting from a blank computer, install IntelliJ or other IDE of your choice.
2. Go to https://micronaut.io/launch and use the little wizard to pick whatever languages and features you want to start with.
3. Download the generated project, open it in your IDE. All the dependencies are now downloaded automatically including the build system and the Java runtime itself. Likewise if you picked features that use JavaScript.
4. Tweak it, run it. To ship it you have several options, but an easy approach is to add this to your build.gradle file (if you're using Gradle):
dockerBuild {
images = ["[REPO_URL]/[NAMESPACE]/my-image:$project.version"]
}
and then invoke the dockerPush build target, either from the CLI (./gradlew dockerPush) or the IDE. You can also compile it to a standalone Linux executable with another build target. That's all there is to it. I don't think Rust improves on this situation. Note that the above instructions work on any computer in the same way, including Windows, with no additional work required.Re: Rust needs a web framework
#387Earlier quoted context omitted.
Anyone on JVM has already Kotlin or Scala for that. Likewise on CLR with F#.
These are measurably used orders of magnitude less than the flagship languages for those platforms.
Re: Rust needs a web framework
#388Re: Rust needs a web framework
#389Re: Rust needs a web framework
#390Earlier quoted context omitted.
> Rust has everything you need here, not getting why you think this requires a framework. Because you're reinventing a wheel that doesn't need reinvention, and the most likely thing is that you will neither reinvent it nor pick the best library that an opinionated framework with hundreds of eyeballs has. > again, match for that, map your url parts, whatever - it doesn't need a 10,000 pound gorilla when it can be done…
> and the most likely thing is that you will neither reinvent it nor pick the best library that an opinionated framework with hundreds of eyeballs has. Having used Spring has convinced me that framework popularity has no correlation with quality.