Live data from Hacker News

Was Rust Worth It?

jsoverson.medium.com

151–160 of 736 posts

Re: Was Rust Worth It?

#151

Earlier quoted context omitted.

ChatGPT 4 has worked great for Rust for me.

When I tried it a while back it had no grasp of the hard parts of Rust - of which there are many. Not knowing the hard parts is not a workable outcome.

Did you try ChatGPT 3.5 or 4? There’s a world of difference. Whats an example of a question it failed?

I understand Rust pretty well. I can totally see ChatGPT not being able to help with complex lifetime issues. I’ve never asked it such things.

Re: Was Rust Worth It?

#152
post #5

Earlier quoted context omitted.

URLs for packages makes a lot of sense. It works well in the land of Go. It also conveniently eliminates the need for the language to have a global packages database. Upload your package to example.com/your-thing and it's released! (You can, of course, still offer a cache and search engine if you want to.)

No, URL's don't make sense because your application shouldn't care where on the internet your dependency happened to be hosted when you integrated it. It's location has nothing to do with what it is. By the time you're going to production, your vetted and locked dependency should be living in your own cache/mirror/vendored-repo/whatever so that you know exactly what code you built your project around and know exactly…

URLs are well structured and unique, with a sensible default - sourcing the file from the internet - and ubiquitous processes for easily mapping the URL to an alternative location.

I.e., when you're going to run the production build, the URLs are mapped to fetch from the vetted cache and not the internet.

I don't see any downsides to allowing them as a source, or making them the default approach

Re: Was Rust Worth It?

#153
post #121

Earlier quoted context omitted.

Why does something like that need to be secret...? Isn't it in the community's best interest?

Drama avoidance and avoiding bikeshedding seem obvious. Much easier to present a working system than a design that will get nitpicked into irrelevancy.

Yeah, that makes sense.

Re: Was Rust Worth It?

#154
post #144

To clarify, they aren't disabling the lints in the section you've highlighted. `deny` makes a lint a failure instead of a warning. This is similar to `-Werror` in C. `allow` is the directive to disable a lint. Eg, I often start new or disposable projects with `#![allow(unused, dead_code)]` just to keep my IDE clean while the code is in an unpolished state.

You are correct! I misread it entirely, that's on me. I misread #![deny] as #![allow].

Re: Was Rust Worth It?

#156

Programming in Rust is really not like being in an abusive relationship. The compiler is trying to help out as much as possible, especially since rustc has the best error messages in the world.

The OSes want programmers to handle resources correctly, and the Rust compiler makes that task a breeze. We are in a more abusive relationship with our OSes, than the Rust compiler. How about the hardware? Doesn't that need to run assembly in a correct way? That counts as an abusive relationship as well.

Rust's error messages are one of a kind. There no other compiler which comes even close.

As a side note, i used latex lately, it's error messages are horrendous. What a nightmare to figure out what's wrong by inspecting the error.

Re: Was Rust Worth It?

#157

I feel like Rust finally broke the idea that programmers should be in complete control and completely conscious of everything the compiler is doing. It hasn't been that way in decades, compilers are freaking magic. But Rust undid a lot of that with borrowing. People became comfortable with the compiler knowing better than them. I just wish we could relax further: We should never be explicitly iterating forward over a…

> Give me rusty bash.

Bash with types (especially floats), fewer edge cases, functions with explicit parameters, simple command line flags...

Re: Was Rust Worth It?

#158
post #140
post #9

Earlier quoted context omitted.

> Maybe it was a reaction against the Java-style reverse DNS notation I suspect it was less a reaction against anything and more just following the norms established by most other package managers. NPM, PyPI, RubyGems, Elixir's Hex, Haskell's Cabal... I'm having a hard time thinking of a non-Java package manager that was around at the time Rust came out that didn't have a single, global namespace. Some have tried to…

I'm honestly astounded at how badly many languages have implemented dependency management, particularly when Java basically got this right almost 20 years ago (Maven) and others have made the mistakes that Java fixed. With Maven you get: 1. Flexible version (of requirements) specification; 2. Yes, source code had domain names in packages but that came from Java and you can technically separate that in the dependency…

Yes, #3 in particular is important for many large corps where one team develops a library that may be pulled in by literally thousands of other developers.

Re: Was Rust Worth It?

#159

As an outsider, I often hear about async Rust being less than ideal. Perhaps I don't understand, because I haven't dipped my toes in the water yet... but I do most of my work in Kotlin with Coroutines, and concurrency is everywhere in the UI. I can't imagine working in a language having a major deficit in this space. Are there any efforts to overhaul or completely rethink this?

It’s pretty much the same issue all languages have, that async functions are colored. I don’t think it is unique to rust. Algebraic effects would solve this, but I don’t know any language other than OCaml that is working on that approach.

Unison [1] has algebraic effects as a first-class feature. They call them "abilities" there. You can make async about as transparent/opaque as you want it. Docs on abilities in [2].

[1]: https://www.unison-lang.org/

[2]: https://www.unison-lang.org/learn/language-reference/abiliti...

Post reply on HN