News for hackers. Stuff that matters.
Re:A lot of complex “scalable” systems can be done with a si... by z0mbie42 on Monday December 30, 2019 @04:33AM (#21912123)
Hi, I'm curious because I plan to rewrite a Rust service to Go (development velocity is too slow) Which part of your service is in Rust amd which in Go? Do you think that if it would be only in Go it could sustain such a load?
Re:A lot of complex “scalable” systems can be done with a si... by zozbot234 on Monday December 30, 2019 @10:28AM (#21913909)
What specific ergonomics pitfalls did you experience in Rust? "Development velocity is too slow" is a bit vague; beyond the use of GC, which only really matters in specialized domains, there's not much reason to think that rewriting your service in Go would give you better 'development velocity'.
Re:A lot of complex “scalable” systems can be done with a si... by kick on Monday December 30, 2019 @02:24PM (#21915933)
There is, though. Go was designed to be easier to reason with than conventional ALGOL-derivatives, while Rust wasn't.

To quote Rob Pike:

The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

Go is aiming for the same niche that Python is. This has the accidental side effect of making it faster to write software in it than most of the ALGOL-derivatives. To quote Eric Raymond (sorry) on Python:

When you're writing working code nearly as fast as you can type and your misstep rate is near zero, it generally means you've achieved mastery of the language. But that didn't make sense, because it was still day one and I was regularly pausing to look up new language and library features!

Go and Python both allow for expression about as fast as you can type, by virtue of being designed for [children in Go's case, shell scripting in Python's case].

It's not a value judgement of Rust or anything, but Rust wasn't designed with the same goals in mind.

Re:A lot of complex “scalable” systems can be done with a si... by zozbot234 on Monday December 30, 2019 @02:57PM (#21916142)
> Go was designed to be easier to reason with than conventional ALGOL-derivatives, while Rust wasn't.

This may be a problem of what's idiomatic in each language, as opposed to a matter of language design per se. After all, Rust development can be made at least as easy as, e.g. Swift, simply by adding enough uses of .clone() and RefCell<>. Is this suboptimal? Of course, but it will still be plenty faster than Python, and perhaps even faster than Go.

Compilation time is a separate issue which apparently OP found problematic. It's being dealt with (for non-release optimized builds) via the cranelift project, which is a Rust-specific backend much like the Go compiler, with no reliance on LLVM.

Re:A lot of complex “scalable” systems can be done with a si... by kick on Monday December 30, 2019 @03:38PM (#21916491)
This may be a problem of what's idiomatic in each language, as opposed to a matter of language design per se.

It's absolutely a matter of language design. Again, I'm not criticizing Rust, but a language explicitly designed to be trivially written by anyone, fast, is going to be easier to write in quickly by anyone. Imagine making that comment about Logo instead of Go. Of course Logo is more painless to write than Rust! It's a child's language. So is Go!

Rust development can't be made as easy as Swift (and it is very unlikely that what you described would be faster than Go). Even Graydon Hoare agrees that Rust is inadequate in comparison to Swift in terms of development ease:

https://www.reddit.com/r/rust/comments/7qels2/i_wonder_why_g...

I'm no stranger to languages with vastly different idioms than normal (I write APL daily), but not all languages are as quick to develop in as every other, and pretending they are is silly. Rust has some innovations, and it's by no means a bad language in itself, but pretending it wins at everything under the sun (even things it's not trying to do) doesn't reflect reality or the perspective of the original author.

Re:A lot of complex “scalable” systems can be done with a si... by erik_seaberg on Monday December 30, 2019 @03:26PM (#21916382)
If you can write a ton of code without thinking very much, you're probably writing boilerplate that should have been generated from a human-level description of the problem. Your job is to only spend time writing what needs to be written.
Re:A lot of complex “scalable” systems can be done with a si... by kick on Monday December 30, 2019 @03:50PM (#21916588)
Languages that allow you to write as fast as you think are a blessing.

"Write as fast as you think" is a far better way to program than "Write much slower than you can think."

Eric Raymond has written some pretty substantial things, and he's not as clueless (on programming, at least, the rest of his views are...no) as you're implying.

The idea that intuitive languages are the only ones you should do development in is absurd. A single line of K can do what a hundred lines of C can, and you can write the line of K substantially faster than you could write the C to match. K only has something like 50 primitives. It's simple enough that you can keep it all in your head at once, and that allows you to develop much quicker than almost any ALGOL-derivative. Taking your comment at face value, everything written must be boilerplate. Looking at reality paints a different picture.

Good languages manage complexity in a way that allow you to express complex things in simple terms. That the languages you seem to be familiar with only allow you to describe simple things in simple terms isn't something that's inherent to every programming language. I'd recommend giving APL, J, or K a try.

Re:A lot of complex “scalable” systems can be done with a si... by erik_seaberg on Monday December 30, 2019 @10:36PM (#21918748)
I'm all in favor of concise and expressive languages (even weird ones). I hate being slowed down by the language itself. But writing the first thing that comes into my head leads me to reinventing the wheel a lot, and (at least at work) we have a responsibility to find reusable abstractions and only create new code that's needed.
Re:A lot of complex “scalable” systems can be done with a si... by kick on Monday December 30, 2019 @11:17PM (#21918912)
I disagree with that. If your code base is small enough, a few redundant lines (idioms) don't matter.

To bring up k again, the language has already done about the maximum amount of abstraction possible. There's really no room for the programmer to make reusable abstractions; any useful ones have already been made. That allows you to do very useful things in very small amounts of code. Picking a random example, here's a complete Sudoku solver in 75 bytes:

http://nsl.com/k/sudoku/aw3.k

Re:A lot of complex “scalable” systems can be done with a si... by kick on Monday December 30, 2019 @05:59PM (#21917463)
Typo: "The idea that unintuitive languages..."
Re:A lot of complex “scalable” systems can be done with a si... by z0mbie42 on Monday December 30, 2019 @01:47PM (#21915668)
By development velocity I mean implementing new features, from idea to deployment.

Rust is slow to compile so it breaks my deep work when programming, also it costs me a lot in CI/CD. Also the Rust type system make implementing some things really hard.

For example I wanted to implement json requests logging. It took me more than 1 day in Rust, less than 2 hour in go.