News for hackers. Stuff that matters.
Re:Switching to AWS Graviton slashed our infrastructure bill... by moloch-hai on Wednesday November 30, 2022 @05:39PM (#33808982)
It seems very diplomatic of you to say you found Rust hard to learn, rather than that it was hard to make Rust do what you wanted. You seem very clear on what you wanted to do.
Re:Switching to AWS Graviton slashed our infrastructure bill... by andrewstuart on Wednesday November 30, 2022 @06:04PM (#33809288)
I managed to build it without really grasping Rust by hacking around and looking at examples of how other stuff worked that I wanted to do, and by avoiding doing things in Rust that I didn't understand - stuff as basic as function calls.

The resulting code worked but was garbage and at the end of the day Rust had not clicked for me and being fluent in it still felt a distant goal.

I love the idea of Rust but I don't like the implementation.

I'm hoping in time there will be a new language created that has the memory and thread safety of Rust but is 50 times more simple.

Re:Switching to AWS Graviton slashed our infrastructure bill... by estebank on Wednesday November 30, 2022 @11:12PM (#33812235)
If you don't mind, what where the things that were hard to deal with? You mention "function calls", but I'd like to understand what that actually means in practice. This kind of negative feedback is useful to improve Rust for any other newcomers, even if we have already soured you for good.
Re:Switching to AWS Graviton slashed our infrastructure bill... by andrewstuart on Thursday December 01, 2022 @12:50AM (#33812844)
I could not even succeed in doing the simplest thing like putting code into a function and executing the function and getting a result back. I can't recall why.
Re:Switching to AWS Graviton slashed our infrastructure bill... by likeabbas on Thursday December 01, 2022 @07:38AM (#33815453)
Interestingly, I started a side project to rebuild OneTimeSecret in Rust yesterday and got the basics working already https://github.com/likeabbas/RustOneTimeSecret

The only other exposure I had to the language was attempting some Leetcode problems. I really like Rust so far. The type system is extremely powerful, the compiler gives robust error messages, and it has so many awesome features like pattern matching and destructuring.

Re:Switching to AWS Graviton slashed our infrastructure bill... by andrewstuart on Thursday December 01, 2022 @06:31PM (#33824596)
You are smarter than me.
Re:Switching to AWS Graviton slashed our infrastructure bill... by likeabbas on Friday December 02, 2022 @08:53AM (#33830402)
Doubtful. I may have wanted to like Rust more than you when giving it a shot.

I've written a lot of Java and Go but I never enjoyed writing in those languages. I found functional programming languages in college to be very fun, and Rust is giving me that same feeling.

Re:Switching to AWS Graviton slashed our infrastructure bill... by mathewvp on Thursday December 01, 2022 @01:17PM (#33820224)
> If you don't mind, what where the things that were hard to deal with?

The language syntax itself. Looks like the language developers wanted rust to stand out and purposefully went out of way to make it extremely difficult to learn. This is one area where Go shines, you can learn the syntax in half a day.

Re:Switching to AWS Graviton slashed our infrastructure bill... by moloch-hai on Thursday December 01, 2022 @01:51PM (#33820767)
Rust syntax shoulders a load of semantics most languages don't bother trying to represent. They could have made it more wordy, instead, but chose the much shorter symbols, many of which can often be ignored when skimming, more easily than keywords would have been.

They have not loaded up the language with any unnecessary syntax. Go lacks the syntax because it is unable to express the semantics, and is (deliberately) a much less capable language for that. Rust is meant for professionals, so must be able to express whatever they may need to say, where Go was meant to keep junior coders out of trouble.

Re:Switching to AWS Graviton slashed our infrastructure bill... by andrewstuart on Thursday December 01, 2022 @06:31PM (#33824594)
>> They have not loaded up the language with any unnecessary syntax.

Rust is composed of at least six sub languages.

Re:Switching to AWS Graviton slashed our infrastructure bill... by estebank on Thursday December 01, 2022 @06:44PM (#33824760)
What syntax would you remove?
Re:Switching to AWS Graviton slashed our infrastructure bill... by mathewvp on Friday December 02, 2022 @01:12AM (#33827397)
> Rust is meant for professionals, ..., where Go was meant to keep junior coders out of trouble.

So we the not so elite coders will stick with Go, thanks.