News for hackers. Stuff that matters.
Re:Moving from Ruby to Rust by stavros on Thursday February 14, 2019 @06:58PM (#19167280)
I've been wanting to learn Rust for a long time, but I'm hit by the curse of Python being the second best at everything. Every time I try to write something in Rust, I think "okay, I can either spend a week learning Rust and writing this, by which point I might lose motivation, or I can have it done in Python in an hour".

Unfortunately, Python always wins, and it's also never not an option, since it runs on everything I care to develop on :(

Re:Moving from Ruby to Rust by ilovecaching on Thursday February 14, 2019 @07:05PM (#19167317)
Is it second best though? I can write an app in Go in the same amount of time it would take me in Python and it would be an order of magnitude faster, multithreaded, and type checked. Python is really quite slow and error prone if you think about it.
Re:Moving from Ruby to Rust by smogcutter on Thursday February 14, 2019 @08:40PM (#19167824)
You're missing the point, he could've said brainfuck instead of python and the content would be the same: it's hard to motivate yourself to learn something new when you're already productive in another language and want to get work done.
Re:Moving from Ruby to Rust by kkarakk on Friday February 15, 2019 @02:08AM (#19169038)
guess what you've discovered the reason for ageism in the software industry. the way languages work nowadays is that it is easier to switch over to another language entirely that better solves your problem than create a new feature in [language you use].

if you can't do this quickly and easily, consider your career kaput when you hit 40

Re:Moving from Ruby to Rust by vidarh on Friday February 15, 2019 @07:20AM (#19170245)
As someone in my 40's, I find far more of an insistence of sticking to a single language they're familiar with among younger developers.

Over the years, I've done commercial work in M68 asm, Awk, shell script, Pascal, C, C++, PHP, Javascript, WordBasic, Java, Ruby, and I've used about a dozen other languages on a hobby basis or out of a wish to learn.

But at the same time, I don't randomly switch languages for no good reason. I see the attitude of thinking it is easier to switch as a large part of the problem. Yes, there are cases where a switch is worthwhile. But all to often I see people describing how and why they switch in ways that makes it very clear that they didn't grasp the architectural reasons for why their original solution was broken.

The poster-child for that being Twitter, where they went from a Rails-setup that just violated pretty much every basic principle of proper architecture for scaling a messaging platform (I've written quite a bit about this, but the short of it is that their problem had been solved for decades: federate behind the scenes), and blamed it on Ruby and Rails.

It's perfectly possible they benefited from their language changes, but the main thing their language change gave them was that it forced them to re-design their system from scratch. And that is a common story. It may well be that blaming a certain platform is sometimes necessary to provide "political cover" to justify a large rewrite, but to me, large scale language changes often suggest covering up design flaws.

To bring things back to the article:

In this case it's certainly possible Rust is a good choice for them, especially as they had past experience with it and used it in some parts of the system already, but here, to me, this sentence already implies a design problem (lack of concurrency):

> The computations themselves are quick, but the problem is that we need to do a lot of them: for each order, we need to go over all available riders to determine which assignment would be the best.

Personally, my first step would have been to run the calculations in parallel. Maybe they'd still also want to switch it to Rust, but unless they stop adding riders, they've just deferred the real problem unless they took the opportunity of the switch to Rust to also parallelise the calculations.

Another issue here implies another area where a substantial portion of their time is a result of their design rather than language choice:

> This means 0.6 second is a Ruby/DB overhead of loading data and sending assignments to riders.

Why is there DB load here? There is simply no way that they are dealing with so many riders and locations in any given region that they can not hold an up-to-date view in-memory in the dispatcher (yes, they'll need to record it as well). A lot of developers these days are scared of loading things into memory, but you can often scale systems to 10x or 100x capacity by being willing to maintain in-memory state. Often you'll even end up with simpler systems.

This is not to suggest they're wrong to pick Rust or wrong to choose to switch, because that also depends on what they're experienced with and what works for them, but it's to point out that being quick to go for switching languages is often a result of different viewpoints rather than need. And sometimes lack of experience.

Re:Moving from Ruby to Rust by WrtCdEvrydy on Thursday February 14, 2019 @09:11PM (#19167938)
I wonder if that will be the next abstraction layer.

A programming language that compiles down into target programming languages.

Reminds me of Haxe.

Re:Moving from Ruby to Rust by bluejekyll on Thursday February 14, 2019 @10:14PM (#19168182)
In some senses, this is what all the JVM languages are, or the WASM languages, or C FFI. You can build compatible layers between any languages, but at the end of the day, most people want to be able to read the libraries and other source code they’re working with.

Scala, Kotlin, and Java can all interop with each other, but at the end of the day much of the libraries get rewritten between the languages.

Re:Moving from Ruby to Rust by samatman on Friday February 15, 2019 @02:47AM (#19169208)
In addition to the sibling comments, this is also one of the nice things about the Clojure ecosystem: between the JVM and JS, you can target anything with an OS.

I would love to see that expand to have an LLVM/C target; the GC complicates that but it could be done.

Re:Moving from Ruby to Rust by brandonhorst on Thursday February 14, 2019 @09:56PM (#19168115)
This is already the world with JavaScript. It can be nice as the compiled code is still humanly understandable.
Re:Moving from Ruby to Rust by ofrzeta on Friday February 15, 2019 @10:30AM (#19171641)
I've done development in both and I doubt that you can be as "productive" in Go as in Python on a wide range of subjects. One reason is dynamic typing, the other is the vast amount of libraries the Python ecosystem offers. Nothing has been said about run time or robustness, though.
Re:Moving from Ruby to Rust by j88439h84 on Friday February 15, 2019 @03:04AM (#19169266)
Not if you use pypy and mypy.
Re:Moving from Ruby to Rust by robrtsql on Friday February 15, 2019 @11:31AM (#19172176)
My issue with mypy is that I would like it to verify that I'm passing the right types into functions from my dependencies. For example, I do a lot of scripting with Python and boto3 to interact with AWS, and my scripts often fail the first time because I misread the field name or structure of a JSON object that goes into or comes from the API. It makes me wish I was using Java or Go, because at least then the compiler would have told me it was wrong.

I'm not sure if a solution to this exists yet. It seems like it's up to the dependency to adopt mypy as well?

Re:Moving from Ruby to Rust by j88439h84 on Saturday February 16, 2019 @01:22PM (#19180037)
Yeah I think so.

There is monkeytype which can infer the types from test runs and insert them into source, so its quite easy to add annotations.

Re:Moving from Ruby to Rust by aldanor on Friday February 15, 2019 @07:48AM (#19170417)
There's also things like numba - basically a Python decorator that lazily JIT-compiles Python functions to LLVM, and supports numpy. For scientific work, it's quite often hard to beat (and sometimes somehow beats a raw c/c++ implementation of the same thing).
Re:Moving from Ruby to Rust by ngrilly on Friday February 15, 2019 @06:49AM (#19170102)
And it will also use less memory.
Re:Moving from Ruby to Rust by buster on Thursday February 14, 2019 @07:23PM (#19167437)
You should still consider learning some rust, because you'll learn some new concepts which might be a win for you anyway (thinking of error handling, options, enum matching, ownership, and what not). Trust me, learning rust zo some degree will make you a better programmer overall!
Re:Moving from Ruby to Rust by StavrosK on Thursday February 14, 2019 @07:28PM (#19167480)
I'm already familiar with some of it and have written various things, but I'm not at the point where I reach for it and am proficient enough at it to prefer it. That's where I'd like to get.
Re:Moving from Ruby to Rust by etxm on Thursday February 14, 2019 @09:16PM (#19167957)
Similar except go and ruby.

I’ve tooled around in rust a bit. I like it much more than go, but all-the-ops-things are go, so I feel that’s where I need to put my play time.

About 3 months ago I started setting aside an hour every morning before work specifically to only work in go.

It was the only way I could learn it because on the job I would just lean on the languages I knew I could develop fast in.

Re:Moving from Ruby to Rust by yawaramin on Thursday February 14, 2019 @10:14PM (#19168183)
You may find OCaml interesting, here's a comprehensive article explaining the benefits relative to Python, from someone who actually ported a significant Python project over to it: http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you-gain...
Re:Moving from Ruby to Rust by coder543 on Thursday February 14, 2019 @10:36PM (#19168271)
Except that OCaml is still (for the foreseeable future) single-core only, just like Python, yet it doesn't have the ecosystem Python has. How many good database drivers are there for OCaml? How good are the web frameworks? If I wanted to write a Kafka consumer in OCaml, which battle-tested library would I pick? If I wanted to send an email through {MailGun, SendGrid, Postmarkapp}, are there any integrations that help with that?

Even an example of an echo server doesn't look that appealing: https://dev.realworldocaml.org/concurrent-programming.html#i... But, perhaps that is just unfamiliarity on my part. Rust was heavily influenced by some of OCaml's choices, but they chose to make the syntax more familiar and approachable to people coming from the mainstream programming world, although it does have its own quirks.

With Go and Rust as options, I'm not sure why someone would pick OCaml in 2019. In 2014, when that article was written, Go and Rust were both much less mature. I hear ReasonML/OCaml could be interesting for frontend work, but frontend is not my specialty.

Honestly, as easy as it is to hate on the npm ecosystem, Node.js can run circles around Python in performance, and TypeScript offers a pretty nice type system. If someone just wants a "better Python" for web-related stuff, TypeScript on the backend might be a good option, although I personally lean towards Rust and Go, depending on the project.

Re:Moving from Ruby to Rust by aldanor on Friday February 15, 2019 @07:51AM (#19170435)
> I'm not sure why someone would pick OCaml in 2019

You definitely would if you already have millions of LoC in OCaml.. like Jane Street does.

For a random person, I would agree. I tried it myself for a few personal projects (I know Rust/Python/C++/Haskell reasonably well) and couldn't get myself to like it, subjectively.

Re:Moving from Ruby to Rust by yawaramin on Thursday February 14, 2019 @11:22PM (#19168441)
Being 'single-core only' is not that much of a problem if you're coming from Python and immediately seeing a huge performance boost compiling to Go-style static native binaries, I think? People immediately jump on the 'single-core' thing with OCaml, but can you explain what exactly it is that you're trying to do with multicore that's not covered by a concurrency library like Lwt or a multi-processing library like Async Parallel?

Re: database drivers–which one are you looking for? MSSQL ( https://discuss.ocaml.org/t/ann-first-release-of-mssql/3242 )? Or Postgres ( http://mmottl.github.io/postgresql-ocaml/ )? Or SQLite ( https://github.com/mmottl/sqlite3-ocaml )?

Re: web frameworks–Eliom ( https://ocsigen.org/eliom/6.6/manual/intro ) is one of the most powerful isomorphic web frameworks. Or do you want to spin up a quick JSON API server with Cohttp ( https://github.com/mirage/ocaml-cohttp )? Or dig into a high-performance, lower-level server ( https://github.com/inhabitedtype/httpaf )?

Or you want a Kafka client ( https://opam.ocaml.org/packages/kafka/ )?

Or maybe you can just take advantage of BuckleScript's high-fidelity approach to transpiling OCaml to JavaScript, and write some bindings to take advantage of basically everything in the npm ecosystem?

Sure, not every OCaml library is battle-tested, but I think that's not a good reason to immediately discount it. I didn't tell StavrosK to immediately commit to and rewrite everything in OCaml, I said he might find it interesting. Even with Go, Rust, and TypeScript as options, because:

- Not everyone is satisfied with Go's type system or its model of error handling, or its low ceiling for abstraction.

- Not everyone is satisfied with Rust's overall newness and potential compiler and library bugs, its lack of GC and the subsequent having to deal with borrow checking, or its slow compile times.

- Not everyone is satisfied with trying to model the dynamic complexity of JavaScript in a new, explicitly unsound type system. And it's no secret that the BuckleScript compiler can run rings around tsc for compile speed (not even mentioning the more powerful and battle-tested OCaml language).

Re:Moving from Ruby to Rust by coder543 on Friday February 15, 2019 @12:11AM (#19168592)
Multicore is important because it allows as close to perfect resource utilization as you can get on each machine. When you spin up separate processes, you end up with separate connection pools to every other service (such as databases, mail providers, etc.) which is measurably wasteful, but more importantly, you never efficiently utilize your CPU. I've personally witnessed this with Ruby deployments. You can spin up a server per core, but then you always leave some small percent on the table. So then you could spin up more than one per core, but then you're introducing additional resource contention and scheduler overhead, not to mention even more connection pools. Each process also has its own separate garbage collector, which is less efficient than just having a single GC.

These are only a few things, and only discussing IO bound tasks. Once you start doing CPU intensive stuff, the problems are just made worse, especially if you want to spin off background jobs to work on things after finishing a request.

I know that a library of some kind has been written for each thing that I mentioned, but that doesn't make them ergonomic or reliable. The last time that I researched this, everyone discussing their experiences trying to use Postgres from OCaml had nothing good to say.

The TechEmpower benchmarks don't even include a single entry with OCaml, simply because no one has submitted one, which speaks volumes about the size and maturity of the state of writing a web server in OCaml.

For business critical functions like your database driver and your web server libraries, being battle tested is very important.

The Rust compiler is plenty mature, it's built on LLVM, and has had years of real world use by a growing number of companies. The Rust community places more emphasis on stability than any other I've been part of.

But, the async story and web server stories are not currently mature, which is why I'm happy to use Go for those things. Actix is as close to mature as those things get in Rust right now, and it's not up to my standards yet.

For someone to be so upset with all three of those languages on those counts that they decide to shoulder the burdens OCaml brings... that would be surprising. I had already pointed out that OCaml on the web has become a niche thanks to ReasonML (where BuckleScript is the compiler), especially since the web is predominantly single core.

"Explicitly unsound" is pretty funny to me. TypeScript has a really strong type system. To say otherwise as a negative thing at this point is to be purely pedantic in the most academic of ways, in my opinion.

Re:Moving from Ruby to Rust by yawaramin on Friday February 15, 2019 @12:27AM (#19168650)
I get why multicore in general is important and so do the OCaml folks, because they are currently engaged in a serious effort to land multicore in OCaml. That said, OCaml currently offers a great concurrency story (Lwt), and multiprocessing solutions that get you to like 90% of the way there when you really actually need multicore. You called me out for being pedantic about unsoundness which can lead to actual runtime errors, but aren't you being pedantic about insisting that OCaml is worthless if it can't squeeze out every single bit of processing power from your cores?

Discounting every OCaml library as not being 'ergonomic or reliable', really smacks of goalpost-moving. Every OCaml library needs to be immaculately designed and battle-tested? It's not even worth looking at otherwise? This is a weirdly high bar. No one even thinks like this about TypeScript, which by the way has library typings that are full of next-to-useless `any` and `function` types.

Agreed, the TechEmpower benchmarks don't include an OCaml entry, but (a) they're only relevant if you care about writing HTTP servers in OCaml; (b) they're only relevant if you care about benchmarks for HTTP servers in OCaml; and (c) the lack of a benchmark in itself doesn't prove anything about writing HTTP servers in OCaml.

The Rust compiler is an amazing effort, but it would be a mistake to equate its maturity level to the OCaml compiler, which has been an ongoing effort for more than two decades now. Frankly I find it strange that someone who immediately attack and dismiss OCaml when it's even suggested as worth checking out–and then accuse someone of being 'upset' with their suggested languages for writing a response.

Re:Moving from Ruby to Rust by coder543 on Friday February 15, 2019 @01:15AM (#19168850)
> You called me out for being pedantic about unsoundness which can lead to actual runtime errors

"actual runtime errors" can and do happen even in Haskell and Ada. Unit and integration tests are important, no matter the language. TypeScript's type system is a huge step up from Python's, and it's better than Go's in many ways. TypeScript's biggest weakness for me is probably that it runs on Node.js, which is single-core.

As I have previously expressed, the major benefit to TypeScript is that it performs much better than Python while offering a strong type system and a strong ecosystem. The main things OCaml seems to offer are a stronger type system and better performance, when compared to Python. OCaml's type system might be marginally better than TypeScript's, but the Pareto principle might suggest that the extra 20% isn't worth the 80% more effort it will require to make up for OCaml's ecosystem. As I've also pointed out that I strongly prefer multi-core systems, you'll notice that I stated up front that I lean towards Rust and Go, not TypeScript. I just think TypeScript is a great fit for the OP, who seems to have been looking for a faster, safer Python (since they're so interested in Rust) with a drop in library for every task (so they can have it done in an hour). The most you have disagreed there is by saying that TypeScript's type system is slightly unsound. Okay. So, you can choose libraries which have really sound types so you can't easily misuse the library, but likely the libraries contain incorrect behaviors. Alternatively, you can choose libraries that are battle-tested by tons of major companies, but their types might not prevent you from every last possible misuse of the library. Either way, you need to write tests for your code to make sure the results are correct. In fact, you might need to write a lot of otherwise common libraries because OCaml is so niche. I don't see how OCaml wins there for the OP's use case, but I'm sure someone finds that trade off preferable.

> Discounting every OCaml library as not being 'ergonomic or reliable', really smacks of goalpost-moving

It's really not, because I made it clear up-front that I was asking about good and/or battle-tested libraries, not just a list of first hits on google. But it is easy to fall back on the defensive by making it sound like I was shifting things around. I literally asked "how good" are the web frameworks, "how many good" database drivers are there, questions which elicit discussion, not just links. Not "are there web frameworks" and "are there database drivers". I tried to be very clear about this up front.

> No one even thinks like this about TypeScript, which by the way has library typings that are full of next-to-useless `any` and `function` types.

I don't agree with your assessment here, since that really just seems like a strawman argument. `any` is a useful tool when used correctly; how else would you build a custom container like a Vec or a HashMap? It would be annoying to have a container that should be fully generic that can only hold some restricted set of types because the type system isn't powerful enough to allow it. However, it would be truly pointless for someone to build a nice TypeScript library using mainly functions that receive and return `any`, so it doesn't follow logically that experienced people would do that. Why wouldn't they just use JavaScript? This idea doesn't pass the smell test. Do you have any evidence for it? In point of fact, people write TypeScript definitions even for JavaScript libraries! This allows people to provide a nice interface into the JS code, so they don't have to see `any` everywhere they look. Why would they care more about the types in JS libraries, which are only approximate, if they're leaving all of their own code without type checking? TypeScript definitions for JS are only approximate, of course, but that's the real world. They're still helpful, just like documentation for a REST endpoint. When you make a REST call to an API, you aren't guaranteed that everything will work as documented, it might reject valid inputs, it might accept erroneous inputs, it might return values of the wrong types... TypeScript definitions for plain JavaScript libraries give you an opportunity to create a wall around your TypeScript code where the unsafety is easier to contain, but there will always be some level of unsafety in the real world. Eliminating 80% of it is a great start. The last 20% is not as easy as the first 20%, and the cost should be weighed against the benefit.

> and then accuse someone of being 'upset' with their suggested languages

I don't think you understood what I had written. I was saying that it's very unlikely that someone would look at all three of Go, Rust, and TypeScript and decide that the specific problems you mentioned are such dealbreakers that they would choose OCaml. I wasn't talking about you or me being upset, I was talking about any third party analyzing the trade-offs, but you seem to have taken it as some kind of attack against you? It definitely wasn't.

I don't hate OCaml. I have followed it for years, hoping it will progress in ways that I find important. Even years ago, multicore was right around the corner: https://news.ycombinator.com/item?id=9582980 but it's still not here, and it's still not in the foreseeable future.

> The Rust compiler is an amazing effort, but it would be a mistake to equate its maturity level to the OCaml compiler

Does it matter that OCaml's compiler has been under development for "more than two decades" if the amount of development is less than has happened on the Rust compiler in half the time? Rust, Go, and TypeScript have had staggering amounts of money and developer-hours dumped into both their compilers and ecosystems over the past few years, while OCaml's have barely moved at all, as far as I've been able to tell.

You can look at the numbers for the compilers:

https://github.com/rust-lang/rust/graphs/contributors?from=2...

https://github.com/ocaml/ocaml/graphs/contributors?from=1995...

The uptick on OCaml seems to correspond to Facebook becoming interested, but on every metric (including total number of contributors, total number of commits, total additions, whatever), the Rust compiler has had a lot more developer-hours of attention than the OCaml compiler, which could be argued makes it more mature than the OCaml compiler... and this is just the Rust compiler frontend itself, which doesn't include the unbelievable amount of time and money that has been sunk into LLVM by Apple and others, which directly benefits Rust.

Let's just say that I don't agree with your conclusion about their relative maturity.

Let me reiterate: I do not hate OCaml. If anything, I'm annoyed with its stagnancy. It has so much potential, and I wish that potential would be realized. ReasonML is the best thing to happen to OCaml in the past 10 years, but that project has been so tightly focused on its objectives that it hasn't bolstered much of the surrounding ecosystem that would be desired for server-side initiatives.

I don't see how this comment thread can become productive, so I'm probably going to bow out now.

Re:Moving from Ruby to Rust by ngrilly on Friday February 15, 2019 @06:59AM (#19170164)
Can't agree more with the description of why multicore is important. This is exactly why we switched from Python to Go for some stuff.
Re:Moving from Ruby to Rust by yawaramin on Saturday February 16, 2019 @10:47AM (#19179098)
Out of curiosity, what kind of work are you doing in Go?
Re:Moving from Ruby to Rust by ngrilly on Thursday February 21, 2019 @01:06PM (#19218997)
A bunch of various tasks like:

- a simple HTTP proxy that saves requests matching some criteria to inspect and debug them later;

- implementing Stripe webhooks for invoicing;

- a simple HTTP handler that forwards client-side JavaScript errors to syslog;

- just-in-time generation and HTTP streaming of backups as .zip files (our customers must be able to get back their data);

- a gateway between MySQL/PostgreSQL and client-side JS charting library to produce reports;

- etc.

As you can see, it's quite standard, and all over the place :-)

Re:Moving from Ruby to Rust by vram11 on Thursday February 14, 2019 @11:45PM (#19168511)
Interesting points. Is OCaml's compiler faster than Rust's?
Re:Moving from Ruby to Rust by yawaramin on Friday February 15, 2019 @12:12AM (#19168598)
Yes, it is quite a lot faster (as well as being older and just generally more featureful after decades of refinements. For example, or-patterns in pattern matches).
Re:Moving from Ruby to Rust by GrayShade on Friday February 15, 2019 @12:40AM (#19168707)
It I understand correctly, Rust just got a limited form of or-patterns, with the requirement that they must be isomorphic (introduce the same number of bindings of the same type).
Re:Moving from Ruby to Rust by Sammi on Thursday February 14, 2019 @07:04PM (#19167315)
Same reason people use Electron for desktop apps. It's just more efficient in development time. And development resources are usually the most expensive part of development.
Re:Moving from Ruby to Rust by thraw0y on Thursday February 14, 2019 @08:00PM (#19167638)
That's the "somebody else's problem" approach to determining requirements. Performance matters for the end user. They just might not be able to articulate it just like that.
Re:Moving from Ruby to Rust by hombre_fatal on Thursday February 14, 2019 @08:17PM (#19167726)
The tool that exists today is more useful than the technically superior tool that doesn't exist at all.

It's all just trade-offs.

Re:Moving from Ruby to Rust by thraw0y on Thursday February 14, 2019 @08:18PM (#19167731)
All tradeoffs indeed. Which is why that blanket statement just doesn't work.

No one ever implemented a serious compiler/OS/3D game in Ruby.

Re:Moving from Ruby to Rust by Sammi on Friday February 15, 2019 @03:59AM (#19169482)
And no one flew to the moon in a fighter jet. You only use the tool that can actually do the job. OP's point was that Python usually does the job, and using Rust out of the gate might be premature optimization I believe.
Re:Moving from Ruby to Rust by empath75 on Thursday February 14, 2019 @09:29PM (#19168002)
I think some languages you should learn because they make you a better programmer in general, even if you never use it for anything — rust and Haskell, in particular.
Re:Moving from Ruby to Rust by wolco on Thursday February 14, 2019 @10:00PM (#19168133)
I haven't seen a Haskell reference in 6 months. I remember when many weekend submissions were around Haskell.
Re:Moving from Ruby to Rust by a-nikolaev on Friday February 15, 2019 @11:23AM (#19172112)
Yeah, now Rust is the Haskell
Re:Moving from Ruby to Rust by dom96 on Thursday February 14, 2019 @07:13PM (#19167360)
You might be more interested in switching to a language that is more similar to Python but has similar benefits to Rust, like Nim. The learning curve won't be as bad and you'll get fast and portable compiled binaries.
Re:Moving from Ruby to Rust by rgoulter on Thursday February 14, 2019 @08:38PM (#19167817)
I thought the reason why "Python is 2nd best" isn't primarily its syntax, but the libraries which are available to use (and big enough communities using them).

e.g. with Python you can find libraries (and decent tutorials/examples) for: a small or big web framework, computer-vision, data-science / reproducible science, machine-learning, natural language processing, web-scraping or website testing.

Re:Moving from Ruby to Rust by StavrosK on Thursday February 14, 2019 @07:17PM (#19167387)
Nim is my second choice, but I really like a lot of things in Rust and would like to learn that, if I can.
Re:Moving from Ruby to Rust by mlboss on Thursday February 14, 2019 @07:41PM (#19167540)
I think python+pybind11 solves everything. Start with python and move slower parts to C++11 using pybind11. Bonus point: You can use all the existing C/C++ libraries. https://github.com/pybind/pybind11
Re:Moving from Ruby to Rust by aldanor on Friday February 15, 2019 @07:53AM (#19170458)
It solves everything if you're happy with C++. Not everyone is, I would personally prefer Rust as it's a better language.

(Source: using Python/C++ at work, contributed a lot to pybind11)

Re:Moving from Ruby to Rust by Dowwie on Friday February 15, 2019 @07:33AM (#19170321)
It's not that Python always wins but that it wins in the context of a work environment with deadlines and other constraints. If you make time outside of that environment for learning Rust, you can give yourself permission to develop new competencies without losing the productivity argument.
Re:Moving from Ruby to Rust by orzig on Friday February 15, 2019 @07:54AM (#19170467)
Also the "bus number" consideration - companies are (reasonably) wary to add things to their codebase that only one developer knows how to maintain.

Getting a group of devs to commit to >6mo learning Rust could kickstart a real change. There needs to be critical mass.

Re:Moving from Ruby to Rust by Dowwie on Friday February 15, 2019 @08:15AM (#19170617)
Key man risk is a real challenge. No doubt. Python wasn't always so popular. There was a time when Java was safer for resourcing and Python was risky. What did managers do, if anything, to manage the risk that their sole Python programmer would one day likely leave?
Re:Moving from Ruby to Rust by StavrosK on Friday February 15, 2019 @07:41AM (#19170381)
It's a personal argument, I get frustrated and lose motivation when I have an idea I want to create and it takes way too long... Especially when I think "with python, it would have been done by now".
Re:Moving from Ruby to Rust by Dowwie on Friday February 15, 2019 @07:57AM (#19170494)
Broaden your scorecard. Time to completion is only one measure (although it is a very important one in many scenarios).

You can email me if you want to explore Rust for your work or interests. I have a Python background, too, and have open sourced work.

Re:Moving from Ruby to Rust by StavrosK on Saturday February 16, 2019 @08:20AM (#19178440)
Thanks, I might! The "time to completion" metric is important for my continued enjoyment, mostly, as I get frustrated otherwise.
Re:Moving from Ruby to Rust by _____bee_____ on Friday February 15, 2019 @05:33AM (#19169828)
That's the story of my life :(