Crystal – A Ruby-esque programing language

In the fall of 2012, Argentinian Ary Borenszweig implemented his Crystal project [1] as a "programming language for people and computers." This sentence probably best expresses what this language sets out to combine: the simplicity and elegance of a Ruby-esque language syntax with the efficiency and speed benefits of compiled languages such as C.

The driving force behind the development of Crystal in recent years has been the Argentine software consulting company Manas [2], which is where Borenszweig works. As of this writing, some 100 volunteers are pushing forward with the project on GitHub [3]. You can look up all of the language's functions in a GitBook [4]. Newcomers can take their first steps without installing anything by entering code into a simple web-based Crystal editor and compiler [5].

Benchmark

The script in Figure 1 runs the Ruby code from Listing 1 as a simple benchmark. It includes a loop containing a multiplication. From the time measured at the start and end of the program, a simple subtraction gives you the execution time. Ruby 1.9.3 takes around six seconds, or around four seconds for JRuby. On the website [5], the same script takes only around 0.3 seconds (Figure 2).

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Embedded Rust

    Rust, a potential successor to C/C++, claims to solve some memory safety issues while maintaining high performance. We look at Rust on embedded systems, where memory safety, concurrency, and security are equally important.

  • Oracle Launches JRuby Website

    Oracle has just released the first, major JRuby application, thus demonstrating the viability of the Java port of the Ruby scripting language.

  • Tech Tools
  • DeskTOPia: xdesktopwaves

    If even the most imaginative desktop background is starting to bore you, it’s time for a change. xdesktop waves allows you to change your desktop into a water scape. You can add rain and storms or just drag your mouse to liven things up.

  • Free Software Projects

    The free high-end game, Yo Frankie, in which players steer a flying squirrel through a colorful 3D world, is almost finished. KI Research still faces major issues, but FreeHAL, a dialog program, gives users a behind-the-scenes look at the current state of affairs.

comments powered by Disqus