Rust-like scripting language

Don't think Ruby was just Rails. The Rails framework made it popular and fashionable. But Ruby is a very nice language all by itself. It may be less popular than Python now, but for little scripting here and there, where bash is too cumbersome and where speed is not needed, I very much like it.

I have no idea what Rails is.

So many languages, so little time. It might have been a hard job to convince me to try yet another scripting language, no matter how good it was.

I had promised myself never to waste another minute of my life getting into yet another language, of any kind.

But then came Rust. The first language since ALGOL to offer genuinely new and practically useful features, what with it's emphasis on correctness and performance.


Objective-C. The objective part of it is entirely dynamic. It's even more dynamic than the compile-time syntax and type checks suggest. The runtime doesn't care about types, and is more dynamic than Python.


That's a great example. I was shocked to learn that monkey-patching the Objective-C runtime is possible. And horrified to hear that one of our developers did it in a production project. :disappointed:

The expressiveness of Ruby went on to inspire so many languages, including Rust. The language itself is a little to magical for my taste, and in fact has kept me from successfully learning Ruby-derived languages like Elixir. Whatever Rust got from Ruby has been great.

1 Like

FWIW, You can use cartesian_product :

use itertools::Itertools;

fn main() {
    for (x, y) in (0..10).cartesian_product(0..5) {
        println!("{}; {}", x, y);

Or if you use ndarray, just sum the two matrices.

1 Like

You are replying to me, I'm not sure what a need cartesian product for.

Can I use ndarray to sum the two arrays as I have shown in posts above? Note that it adds b[j][i] to a[i][j].

Something else to consider is cling—from CERN—and how it is used in some games as its scripting language & engine.

I.e., C++

So we could do the same for Rust. Maybe have some things which execute in a certain context and some default imports and uses.

1 Like

As a recent survey showed, people are trying to avoid Ruby for a number of reasons.

That survey result seems way off topic for this thread.

What is the source for that data anyway?

It does not really say much about Ruby in particular. It's just in there with a bunch of other languages and not even at the top of the "dreaded" scale.

It rather confirms my thesis that when programmers use any language for long enough they start to hate it. Which is why we see experience, skilled, programmers creating new languages all the time. New programming languages sprout like weeds.

I would have thought it is the other way round.

When using a programming language long enough one gets deeper into it, and thru the familiarity with the language a kind of sympathy grows. Same like with other human beings: if I learn more of another person my sympathy for that person grows. One of the exceptions is if the person is phony. Or in terms of programming languages if the language is just bad. :slight_smile:

Nah, if programmers loved the languages they use they would not be constantly inventing new ones :slight_smile:

If we have it your way then according to the stats presented most programmers hate the language they are using and therefore all the languages shown must be bad. Except possibly Haskell.

No I didn't say this. Perhaps my English was bad here. I wanted to say that one of the reasons to abandon a language is that it might be bad. There are many other reasons.

When I look into my own past I can say I started to use a new language if I thought it might be better for what I need than the one I was using before. Or if I thought a certain language might be easier to use than the one I used before.

I tried Haskell before and I was not 100% convinced because for me the monads were always difficult to handle. I used OCaml which I still like but the community is comparatively small and in comparison to Rust there are much less libraries available. I hated C, C++ because it didn't protect me (segfaults, ...).

Then I met Rust and although it is sometimes difficult to get things done the community is very supportive, and there are much more libraries available than in OCaml. And if the compiler is happy I am usually happy as well.

So, in the end I only hate C and C++ although if it is necessary for certain business reasons I even code a bit in C. But this is rare.

1 Like

Torchbear has scripting well-implemented (though not 100% Rust). Recommendations on an extension language?

There's more to do, but it's off to a good start. 1.0 even.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.