News for hackers. Stuff that matters.
Re:Why Crystal Is My Next Language by vinceguidry on Sunday June 10, 2018 @11:04PM (#17281441)
I'm often curious as to what people are doing that makes them really think they need to venture outside their chosen scripting language. I use Ruby thinking I'll 'drop to Rust/Crystal' whenever I need to do something "serious", but that need never seems to manifest. Whatever I code in Ruby seems to just do the job and I can solve perf issues with asynchronous constructs like a jobs server, or something like caching.

At this point I'm really starting to wonder if Ruby really is the One True Language and everyone's going to be using it in 100 years. Like how PG thought Arc would be the hundred-year language.

Does static typing really offer that much more over dynamic? I'm not at all convinced that it does, when you get right down to it. Once Ruby gets a built-in typing system, we'll get to answer that question.

I do believe that Ruby will eventually solve its perf problem and once it does, its pleasing syntax and semantics will just draw everyone back to it the same way it did the first time.

Re:Why Crystal Is My Next Language by atombender on Sunday June 10, 2018 @11:25PM (#17281513)
Former Ruby developer here. I believe we will look back at this period where we eschewed static typing as a historical mistake.

Back in the 2000s I was using mostly statically typed languages (Java, C/C++, ObjectPascal), and compared to those, Ruby and Rails seemed like incredible productivity boosters. But we quickly found that the lack of typing led to all sorts of issues. For one, you need really comprehensive tests to determine whether a change breaks anything. Refactoring becomes not just a chore, but genuinely psychologically stressful as you begin to worry about things breaking in production. And they frequently do. Duck typing is elegant, but it only works so far as you know the range of types to expect. I very quickly got tired of checking the validity of arguments in code and doing coercion such as Array(maybe_array_or_maybe_not). And the nils, ugh. I never created so many bugs as when I was writing Ruby code (though JavaScript is a close second).

A language with a rich type system (Haskell, Swift and Rust come to mind) can eliminate entire classes of bugs. Not just by letting you validate the types of arguments and return values, but by letting you describe your program logic in terms of types. It's often said that Haskell programs rarely have bugs once they compile, and while there are no guarantees, it's often true.

Give a statically typed language a try for a while, and you will probably change your mind. I don't know about Crystal, but Go is a decent entry-level language. (Many former Ruby devs seem to enjoy Go quite a bit.)

Re:Why Crystal Is My Next Language by kjeetgill on Monday June 11, 2018 @12:18AM (#17281752)
> Refactoring becomes not just a chore, but genuinely psychologically stressful as you begin to worry about things breaking in production. And they frequently do.

Beautifully put. The ability refactor confidently is so underrated. It's one of the places where a little bit of verbosity (i.e. Java) pays huge dividends.

> Duck typing is elegant, but it only works so far as you know the range of types to expect.

Go shines particularly well here. In Java code bases, interfaces occasionally accumulate too many methods or interfaces of interfaces start to get unwieldy. I like Go's approach of letting the function declare the relevant subinterface it really needs.

Re:Why Crystal Is My Next Language by rdc12 on Monday June 11, 2018 @05:22AM (#17282909)
I think part of the beauty of static type systems, for refactoring guiding, is that most (if not all) issues arise at the time of change, when the change is fresh in your mind, locality of reference if you will.
Re:Why Crystal Is My Next Language by kazinator on Monday June 11, 2018 @10:43PM (#17290315)
I recently refactored my fork of the linenoise library (written in C) from char to wchar_t. C being statically typed made it easy to find all the places that need to be updated if some declaration is changed from the one type to the other. The editor gathers the compiler errors and takes you to all of them. The result was broken though. For instance, in some places I replaced strcspn (complemented span) with wcsspn instead of wcscspn. It has exactly the same signature. This was caught by testing all the edit operations, and a very careful diff review.

Type checking only works when you make a mistake which breaks a type signature. You can call entirely the wrong function with the right type signature. You can call sin instead of cos, or forget to take a log of something. You an swap the arguments to a subtraction: both are floats. Think of all the numeric code in which lots of variables, arguments, array elements and so on are all of the same type. Or string code in which there are numerous strings. Or OOP code where you have two or more objects in the same scope of exactly the same class, which can get mixed up.

The idea that you do not need a comprehensive test suite because you have static types is horribly wrong.

Re:Why Crystal Is My Next Language by atombender on Tuesday June 12, 2018 @06:24PM (#17298629)
C is not a great example here, because it's somewhat weakly typed. But it's true that typing doesn't fix the identical-arguments problem.
Re:Why Crystal Is My Next Language by vinceguidry on Sunday June 10, 2018 @11:31PM (#17281538)
I'm looking forward to Ruby's upcoming type system. But for now I have no problems leaning on discipline for handling the problems dynamic typing introduces.
Re:Why Crystal Is My Next Language by tigershark on Monday June 11, 2018 @09:40AM (#17284073)
You remind me of all the people that 10 years ago were saying that they don’t need tests because they have the discipline to write correct code...
Re:Why Crystal Is My Next Language by nlh on Sunday June 10, 2018 @11:07PM (#17281453)
I hear you, and I too love Ruby, and I too have yet to actually need the performance benefits of Crystal. But man, you don't realize how awesome static typing is until you actually start using it. There are whole classes of bugs that just get nixed before the program even runs. It makes you think more about how to structure things, how you're passing arguments, how you use variables, etc.

Now maybe you're really really really good w/ Ruby and you don't make those mistakes anymore, but for an "advanced beginner" like myself, it's really helpful.

Re:Why Crystal Is My Next Language by vinceguidry on Sunday June 10, 2018 @11:30PM (#17281530)
Yeah, I'm not saying it's not useful, and I can't wait to introduce static typing into my own programs and get those benefits. But every time I step away from Ruby I end up missing it more than the other language gives me. And this is after I figure out how the other language does what I'm trying to do.

To me typing is something you don't want until you really want it, until then it's just boilerplate. That "class of bugs that just get nixed" isn't something that starts happening, once you're skilled anyway, until a certain point in the evolution of your application.

There's a lot of code that I add to my Ruby classes that involves type-checking, and it would be nice to lean on a dedicated system for handling type abstractions rather than doing it ad-hoc every time I have to do it. For that reason, I'm greatly looking forward to Ruby's upcoming type system.

Re:Why Crystal Is My Next Language by vidarh on Monday June 11, 2018 @02:51AM (#17282323)
I came to Ruby from 20 years of working in statically typed languages, and I think it largely boils down to how you're used to working. E.g. you need test either way, and properly written tests reveal most of the same typing issues static typing does.

I'd enjoy static typing if I didn't have to sacrifice the flexibility of Ruby, but so far I've yet to see a system with good-enough type inference to make up for the extra ceremony. I hope that will eventually change, but what I've seen of Crystal is not it.

Re:Why Crystal Is My Next Language by tigershark on Monday June 11, 2018 @07:11AM (#17283306)
Which statically typed languages did you use in these 20 years? If you ever used Haskell/OCaml/F# it would seem a pretty strange declaration.
Re:Why Crystal Is My Next Language by crimsonalucard on Sunday June 10, 2018 @11:30PM (#17281533)
He's more beginner then you. Calling ruby the one true language after it's been losing traction for years indicates to me he probably just started.
Re:Why Crystal Is My Next Language by vinceguidry on Sunday June 10, 2018 @11:33PM (#17281546)
I've been coding since I was 9 years old, made my first web page at 15, I'm 34 now, having been a pro web dev for 5 years. I'm no greybeard, but I'm definitely not a beginner. And I stand by my assertion. Programming languages come and go. I've been watching it happen for over a decade. Ruby's the one language that transcends the normal reasons why they do that.

Other languages fit hardware or chosen domains better or worse, those are the reasons why you'd choose one or the other. Ruby's the only language that fits the mind better.

Re:Why Crystal Is My Next Language by dragonwriter on Monday June 11, 2018 @12:38AM (#17281844)
> Ruby's the only language that fits the mind better.

Look, I really like Ruby, too, but the idea that it is the one language that “fits the mind better” and is, for that reason, immune to the normal ebb and flow of language popularity is both amazingly parochial in the first case and empirically false in the last case.

Re:Why Crystal Is My Next Language by vinceguidry on Monday June 11, 2018 @01:02AM (#17281951)
What brought me to that conclusion was my rejection of Scheme. I learned Scheme first, through HtDP, which absolutely blew my mind. I wanted to use Scheme for everything, but instead made the pragmatic choice to learn Ruby so that I could more easily find a job, and just use HtDP concepts in my Ruby programs.

Well after awhile I realized I didn't miss Scheme. Like, at all. I had to really think hard about why. The first insight I had was that, well, syntax really does matter, and the paren-soup just isn't aesthetic.

The second thing I realized was that Ruby's object model is just far more intuitive than any other way of dealing with objects. It's just, well, elegant. Everything's an object, everything has a class. This is what Crystal misses. And it can't because of its static nature, types can't be a class. A certain kind of reflection is impossible.

And this is where static vs. dynamic comes in. Static forces you to write boilerplate. Dynamic lets you write it when you need it. You want dynamic until you want static. It's just that simple. No one is inherently better, they're just better suited to different situations. You want to flow from one to the other, not get handcuffed. This makes dynamic inherently better, because you can build a static type checker on top of a dynamic language, but to put dynamic typing inside a static language is just always going to be a kludge.

If I can get pleasing syntax, an elegant object model, and gradual typing in a language that's also faster than Ruby, I'd jump on it. But every other language makes compromises on these points for one reason or another. Of all three, it seems the object model is the most difficult to implement, but it's one I rely on to get me out of jams. I don't often need metaprogramming, but when I do, it saves me a lot of time. And I've never run into anything else like it save in the Lisps.

If I didn't have Ruby, I'd be using a Lisp. Having metaprogramming available, even if you're not using it, gives a real sense of safety, not against silly bugs, but against the much bigger possibility, of making poor abstractions. In Ruby, once I've realized I've made a bad abstraction, I can take the working code and metaprogram it, keeping behavior working, until it's using the semantics I need from it. This makes me far more confident to just knock up systems as quickly as possible, safe in the understanding that I can turn any semantics into any other semantics when I need to. You can fix the propensity to make type errors in a dynamic language with discipline, but you can't fix the propensity to make wrong abstractions with any amount or kind of discipline that I've ever been able to see.

But I'm also surprised just how much syntax impacts my desire to actually write code. There's something about Ruby's code block delimiters that are more pleasing than either whitespace or bracket delimiters. I don't mind bracket delimiters if the whole block is on one line. But to force me to use brackets for multi-line code blocks, the so-called C syntax, well I don't find it half as aesthetically pleasing as Ruby. Is it just personal preference? Perhaps. But I think a hundred years is going to really clarify everything and languages will lose their utility advantages over each other and so all that's left will be aesthetics. And I think Ruby just has everybody beat in this area.

Re:Why Crystal Is My Next Language by dragonwriter on Monday June 11, 2018 @02:39AM (#17282271)
You point to some interesting aesthetic reasons you prefer Ruby, but aesthetics are highly personal and subjective and simply cannot justify the generalizations you made upthread.

Also:

> Static forces you to write boilerplate.

Not very much, inherently, just most static languages have poor (or no) inference, which forces you to write boilerplate (and often poor type systems, which make some otherwise correct approaches impossible, forcing you to code around the type system on top of writing boilerplate.)

Haskell is kind of eye opening in this regard, in terms of a statically tired language where these problems are minimized compared to most popular static languages.

Re:Why Crystal Is My Next Language by crimsonalucard on Monday June 11, 2018 @11:05AM (#17284846)
As elegant as it is, scheme suffers from the same pitfall as python and ruby: lack of type checking.
Re:Why Crystal Is My Next Language by CrystalLangUser on Monday June 11, 2018 @12:11AM (#17281706)
Good thing Crystal based its syntax off of Ruby then. And it's statically typed, thank god.

I do professional work in Ruby currently, but Crystal is just so much more pleasant to work with.

Re:Why Crystal Is My Next Language by crimsonalucard on Monday June 11, 2018 @11:01AM (#17284804)
You are a beginner. Ruby is a dying language that hit it's high point and died and now is at it's at a low point and not going anywhere. It's time has passed like php and now it's used mostly for devops scripting as the technical debt the language accumulates is generally too high even for web apps.

Python, C++, C, Java and javascript are the languages with staying power that came and never went. If you were in the industry that long you'd know that most of the languages I mentioned have serious issues and problems and that the languages staying power has nothing to do with how they fit the "mind" or how good they are.

If you weren't a beginner you'd also note that ruby, like python and like javascript has serious issues when it comes to writing long lasting, reliable code. To code something as reliable and complex as an operating system in ruby would lead to huge amounts of technical debt. As a ruby or python code base grows in complexity it becomes more and more unmaintainable... It would be a mistake to write super complex systems in python or ruby because such systems benefit highly from type checking. Your comments indicate to me that it doesn't matter how long you've been programming... you lack the experience to understand this concept. Ruby is better for scripting then it is for writing applications.

What I have learned over the years is that programming is more about combatting our own faulty human nature, our own propensity to make mistakes. Ironically, the more expressive a language is, the more it gives, us the opportunity to express this fault. Power comes from restriction. Type checking is one such restriction.

Re:Why Crystal Is My Next Language by vinceguidry on Monday June 11, 2018 @12:09PM (#17285476)
You are offering up your lived experience as wisdom without any rationale as to why I should accept your conclusions over my own. Just an endless cavalcade of "you are a beginner and you lack experience." As such it's falling on deaf ears.
Re:Why Crystal Is My Next Language by crimsonalucard on Monday June 11, 2018 @04:40PM (#17288360)
I don't have the time to explain the logic behind my wisdom. I can only show you the door as my conclusions are avenues you obviously haven't explored. It's up to you whether you want to take the blue pill or the red pill.
Re:Why Crystal Is My Next Language by vinceguidry on Monday June 11, 2018 @06:51PM (#17289309)
As someone who does a great deal of mysticism and dealt with a great number of wannabe teachers, I can easily tell the difference between those who are coming from a position of true knowledge and those who are just protecting fragile ego. Guess which category I have you in.
Re:Why Crystal Is My Next Language by crimsonalucard on Tuesday June 12, 2018 @01:19AM (#17290887)
My guess is you have me in the category of someone protecting a fragile ego. I assure you I am not. The choice is yours. If you want to see the light I recommend that you look into Haskell and spend a non trivial amount of time learning that language. Otherwise I could care less.
Re:Why Crystal Is My Next Language by kjeetgill on Monday June 11, 2018 @12:33AM (#17281818)
That's how I feel about Python. It also feels like it has a unique mental ergonomics.

We're both super biased in that regard; everyone has a language they prefer to think in. Usually a dynamic, malleable one.

Who thought perl would die?

That said, I'm going to agree with sibling comments and give Python one big, big, advantage over Ruby: it's made inroads into a ton more domains such as numerical computing, duct tape programming, bioinformatics, ml/ai etc. It's installed by default in nearly every *nix flavor, mac OS included.

Re:Why Crystal Is My Next Language by vgy7ujm on Monday June 11, 2018 @04:57AM (#17282819)
Perl is no more dead than Ruby at least.
Re:Why Crystal Is My Next Language by hota_mazi on Monday June 11, 2018 @12:18AM (#17281748)
But surely you see that Ruby has been on a steady decline for ten years, and with RoR falling out of grace, that decline is accelerating.
Re:Why Crystal Is My Next Language by vinceguidry on Monday June 11, 2018 @12:39AM (#17281849)
People have been saying that about Ruby for years, but what I look for is whether Ruby stops solving problems better than other languages do.

My own shop has recently made the decision to replatform onto Node, for no real reason that I can discover. Just seemed to be a "oh let's all go learn the new hotness over here and toss away our existing architecture in order to do it. When something I wanted I found out was unmaintained in Ruby, I almost went along whole-heartedly with this new direction. But I've found something even more fundamental that's unmaintained in Node that's got me back in the "just use Ruby, it works and I know it really well" camp.

Faddish behavior on the parts of developers doesn't really concern me. I was never concerned that all my RDBMS knowledge would get tossed into the shitter when Mongo hit the scene. A steady decline doesn't bother me. COBOL has been declining for 30 years, and you can still make a fine living supporting COBOL codebases.

No, devs can do whatever they want, there's always going to be that pragmatic group of engineers that will use Ruby because it's still the best at what it does.

Re:Why Crystal Is My Next Language by vidarh on Monday June 11, 2018 @02:54AM (#17282336)
For me the last decade has been one of seeing steadily increasing demand for my Ruby skills, and I don't do Rails at all.

So if Ruby is "on a steady decline" someone forgot to tell my customers and employers.

Re:Why Crystal Is My Next Language by hota_mazi on Monday June 11, 2018 @12:32PM (#17285757)
Your personal experience doesn't invalidate the claim that Ruby is declining.

COBOL programmers are in hot demand because there are so few left that even the few positions where they are needed outnumbers them.

Look at objective numbers on language popularity, job boards, etc... You'll see that Ruby has pretty much vanished.

Re:Why Crystal Is My Next Language by vidarh on Monday June 11, 2018 @12:52PM (#17286031)
I've never once seen "objective numbers on language popularity".
Re:Why Crystal Is My Next Language by crimsonalucard on Monday June 11, 2018 @11:09AM (#17284878)
You live in a bubble. Look up some numbers. From an empirical standpoint ruby is dying. Of course your anecdotal experience trumps all the numbers so my point is invalid.
Re:Why Crystal Is My Next Language by vidarh on Monday June 11, 2018 @11:13AM (#17284925)
I've seen plenty of numbers, and I see it being talked about less some places, more others. I don't see any evidence that it is dying. I see evidence there's less hype surrounding Rails, which is great, as I don't like Rails. In any case it is irrelevant, as what matters to my use of Ruby is that my "bubble" keeps expanding and paying more, and producing more software that I benefit from. If it's "dying" outside of that, then that's not a problem.

This idea of languages "dying" to me indicates bubbles of your own - if there's one thing we've seen over most of the history of software it is that programming languages have remained incredibly persistent for decades even after they stop being used in new development, and we're certainly nowhere near that point for Ruby.

Re:Why Crystal Is My Next Language by losteric on Sunday June 10, 2018 @11:44PM (#17281597)
I think it's a toss up between Python and Ruby, but my bet is on Python.

Python is simple by design. It has optional typing (as of 3.6), beautiful async constructs (ala ES6), nice integration with C/assembly (in CPython), comprehensive open-source software ecosystem, and many strong alternative interpreters.

Ruby feels like it's playing catch-up in every area except metaprogramming... and, while I really enjoyed metaprogramming as an experienced engineer, I'm kinda glad Python lacks that complexity.

Re:Why Crystal Is My Next Language by bmarkovic on Monday June 11, 2018 @01:50AM (#17282120)
> I think it's a toss up between Python and Ruby, but my bet is on Python

What on earth could make you people think Ruby is even a contender? Do you ever look at ANY language usage stats?

If there is a toss-up in dynamic languages the toss-up is between Python and JavaScript and with JavaScript's dominance in the front-end and Python's in data science it's likely to be a turf divide rather than a toss-up.

Re:Why Crystal Is My Next Language by filleduchaos on Monday June 11, 2018 @04:24AM (#17282693)
Do you have any idea what things use Ruby outside of web dev?
Re:Why Crystal Is My Next Language by bmarkovic on Wednesday June 13, 2018 @06:59AM (#17301954)
That doesn't really matter to my arguments. I've used front-end and back-end web dev merely as examples of main drivers of each technology. What matters is that growth of Ruby and related technologies in recent years has been negligible (it has been in free-fall for the last few when considering relative figures actually), and the singular instance of it's major growth was during the 37Signals/Rails era ergo web dev.
Re:Why Crystal Is My Next Language by dragonwriter on Monday June 11, 2018 @12:19AM (#17281756)
> Does static typing really offer that much more over dynamic?

Yes, but it comes with a heavy trade-off if you have an insufficiently expressive type system and/or an excessive need for explicit incantations to the type checker.

Re:Why Crystal Is My Next Language by flavio81 on Monday June 11, 2018 @12:12PM (#17285503)
As a user of Common Lisp that is lately learning Ruby, i am amazed at how weak the type system is and how many stuff that would immediately cause a compiler error in Lisp (like asking values from class members that don't exist) simply pass silently with no error (not even at runtime) in Ruby.

Since every call is a method, and a method belongs to an object, the type of this object is significant. Base Ruby language gives you no way to declare that object X shall be of class C.

So, well, there are dynamic languages and there are dynamic languages.

Re:Why Crystal Is My Next Language by calibas on Sunday June 10, 2018 @11:25PM (#17281515)
In my opinion, "1" + 1 should throw an error, the compiler shouldn't try to interpret what you meant. Dynamic typing opens you up to all sorts of bugs that don't happen with static.

That being said, I don't think dynamic typing is going anywhere, and with experience it's not that difficult to anticipate the problems that come with dynamic typing.

Re:Why Crystal Is My Next Language by out_of_protocol on Monday June 11, 2018 @03:58AM (#17282587)
You are mixing weak and dynamic typing together. Weak, as in JavaScript, PHP, does allow "1"+1 stuff and should be burned with fire. Dynamic strong typing, as in Python, Ruby, does not allow such stuff (though can not be catched at compile time)
Re:Why Crystal Is My Next Language by vinceguidry on Sunday June 10, 2018 @11:43PM (#17281595)
It really isn't all that difficult. Coercion works fine for the case you cited, and especially Ruby has specific idiomatic coercion methods with the semantics you'd want. Ruby does in fact throw a TypeError when you call "1" + 1. The issue is that static typing purists want that error to be thrown at compile time.

I don't see that as necessary. Either you have good discipline regarding types where you need it or you don't. And discipline in your coding extends to way more than just type errors. So anything encouraging to develop your discipline is a good thing.

I think what it comes down to is, not having dynamic typing available to me when I want it is going to be more painful overall than not having a type system when I want it. I look at all the static languages today and I see so much validation of this idea that it's not even funny.

Re:Why Crystal Is My Next Language by sullyj3 on Monday June 11, 2018 @02:55AM (#17282339)
> Either you have good discipline regarding types where you need it or you don't. And discipline in your coding extends to way more than just type errors. So anything encouraging to develop your discipline is a good thing.

I think this is maybe the crux of the difference of opinion between static and dynamic afficianados.

I don't want to have to be disciplined. I want to be able to offload as much of the thinking as I possibly can onto my tools. The reason this is necessary is that I'm human, and I only have a human level capacity to not screw things up. If everything is the responsibility of the programmer, then we are limited in our ability to build large complex systems, to the ability of the programmer to manage this complexity. The only way to transcend this human limitation is to put measures in place to prevent things from falling over when humans turn out to be human after all.

Re:Why Crystal Is My Next Language by vidarh on Monday June 11, 2018 @03:12AM (#17282405)
Those measures you want are tests. You need them just as much with statically typed systems, but it's often easier to tell yourself you don't. If you compare static code with poor test coverage with dynamic code with poor test coverage, the dynamic code is probably more likely to fail with a runtime error of some sort, but in my experience they're about as likely to fail to produce the intended result. Once you add proper tests, most type errors in the dynamic code tends to get caught without specifically testing for it.

I used to make this argument too, until I actually spent some time writing Ruby, and none of my fears came to pass.

Re:Why Crystal Is My Next Language by tigershark on Monday June 11, 2018 @07:33AM (#17283410)
You don’t really need tests for everything. If you make the invalid state unrepresentable in the type system then, guess what? You don’t need to test for its validity and more importantly you are guaranteed that if it compiles it can’t ever reach an invalid state. This renders a whole class of tests unnecessary.
Re:Why Crystal Is My Next Language by vidarh on Monday June 11, 2018 @11:31AM (#17285101)
While that is true, you still need to test to ensure that your representation matches reality, and in practice when you do that in systems written in dynamic languages you tend to cover most type issues implicitly.

For that matter it's not that hard to write code to statically validate that arguments to a given method are checked against a set of types and that this set does not include a representation of invalid values. (E.g. I can "forcibly" wrap any method with checks). The reason the various libraries to do that haven't gained much traction is that they've rarely paid for themselves in reduced effort compared to higher level tests.

I'm all for more static validation, but I just don't think we have suitable tooling yet to do it at a level that provides sufficient benefit.

Re:Why Crystal Is My Next Language by danenania on Sunday June 10, 2018 @11:36PM (#17281562)
It completely depends on your goals. If your primary goal is to build a solid, reasonably scalable web app in a short amount of time, ruby and rails simply cannot be beat.

But if you’re trying to push the envelope somehow on performance, concurrency, safety, number-crunching, or system design, or you need a portable binary, then it makes sense to choose a language that has tools and abstractions better suited for those tasks.

Re:Why Crystal Is My Next Language by vinceguidry on Sunday June 10, 2018 @11:50PM (#17281620)
Ruby's poor at portability, but that's a solvable problem. For everything else, Ruby's got advantages. It really can't be beat regarding safety. Performance can be fixed with native extensions, which ironically are a large source of the portability problems. It's not as good at concurrency as say, Erlang, but it's got the primitives you need and they are first-class parts of the language. Number crunching is just an application and Ruby excels at application building. Just don't ask for a native interface, lol. Shoes is great and all, but it's just a baby.