{"id":14309,"date":"2016-08-04T12:15:27","date_gmt":"2016-08-04T09:15:27","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=14309"},"modified":"2016-08-03T23:21:07","modified_gmt":"2016-08-03T20:21:07","slug":"introduction-crystal-fast-c-slick-ruby","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/","title":{"rendered":"An Introduction to Crystal: Fast as C, Slick as Ruby"},"content":{"rendered":"<p>I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby professionally, and I\u2019d really like to keep it that way. But I\u2019m also aware that languages and tools are destined to be replaced.<\/p>\n<p>Ruby is awesome, but it\u2019s not necessarily known for its speed. Sometimes it\u2019s not the right tool for demanding applications. And we have to wait a while for <a href=\"http:\/\/engineering.appfolio.com\/appfolio-engineering\/2015\/11\/18\/ruby-3x3\">Ruby 3\u00d73<\/a> to happen.<\/p>\n<p>So I\u2019m gonna ask you a question:<\/p>\n<p>To be honest, I\u2019ve always dreamed of something like that and wondered why it didn\u2019t exist. Then I found <a href=\"crystal-lang.org\">Crystal<\/a>. I still remember it clearly: It was July 2015, I was reading <a href=\"reddit.com\/r\/programming\">\/r\/programming<\/a>, and I saw something like \u201cCrystal: Fast as C, Slick as Ruby.\u201d<\/p>\n<p>So I went to the site, downloaded Crystal, and ran my first Crystal (actually Ruby) program:<\/p>\n<pre class=\"brush:php\">crystal hello.rb<\/pre>\n<pre class=\"brush:php\">p \"Hello World\"<\/pre>\n<p>And it worked!<\/p>\n<pre class=\"brush:php\">Hello World<\/pre>\n<blockquote><p>The happiest <code>Hello World<\/code> of all times.<\/p><\/blockquote>\n<h2>Enter Crystal<\/h2>\n<p>Let\u2019s take a closer look at some of Crystal\u2019s goals:<\/p>\n<ul>\n<li>Have a syntax similar to Ruby (but compatibility with Ruby is not a goal).<\/li>\n<li>Statically type-checked but without having to specify the type of variables or method arguments.<\/li>\n<li>Have compile-time evaluation and generation of code, to avoid boilerplate code.<\/li>\n<li>Compile to efficient native code.<\/li>\n<\/ul>\n<p>There are some important points that we need to underline here. First and most important:<\/p>\n<blockquote><p>Have a syntax similar to Ruby (but compatibility with Ruby is not a goal).<\/p><\/blockquote>\n<p>This is pretty self explanatory. Crystal is not Ruby. It can\u2019t run Rails.<\/p>\n<blockquote><p>Statically type-checked but without having to specify the type of variables or method arguments.<\/p><\/blockquote>\n<p>Unlike Ruby, Crystal is a typed language, but most of the time it\u2019s not required to specify types. Take this, for example:<\/p>\n<pre class=\"brush:php\">def greet(name, age)\r\n  \"I'm #{name}, #{age} years old.\"\r\nend\r\n\r\ngreet \"Serdar\", 27 # I'm Serdar, 27 years old.<\/pre>\n<p>So when do we use types, and what they are useful for?<\/p>\n<pre class=\"brush:php\">def add(x : Number, y : Number)\r\n  x + y\r\nend\r\n\r\n# Ok\r\nadd 1, 2 # Ok\r\n\r\n# Error: no overload matches 'add' with types Bool, Bool\r\nadd true, false<\/pre>\n<p>Great, this is a compile-time error. We restrict the method to only accept the types of x,y as a <code>Number<\/code>. In Ruby, this would be a runtime error, <em>a.k.a.<\/em>, a disaster. Yay for Crystal!<\/p>\n<blockquote><p>Have compile-time evaluation and generation of code, to avoid boilerplate code.<\/p><\/blockquote>\n<p>Macros, anyone? Ruby is famous for its <a href=\"https:\/\/en.wikipedia.org\/wiki\/Metaprogramming\">metaprogramming<\/a> capabilities. Crystal uses macros to achieve that while reducing boilerplate code. This example is taken from <a href=\"kemalcr.com\">Kemal<\/a>, an awesome web framework for Crystal.<\/p>\n<pre class=\"brush:php\">HTTP_METHODS = %w(get post put patch delete options)\r\n\r\n{% for method in HTTP_METHODS %}\r\n  def {{method.id}}(path, \u2588 : HTTP::Server::Context -&gt; _)\r\n   Kemal::RouteHandler::INSTANCE.add_route({{method}}.upcase, path, \u2588)\r\n  end\r\n{% end %}<\/pre>\n<p>Here\u2019s how the DSL declaration is done in Kemal, looping through the <code>HTTP_METHODS<\/code> array to define a method for each HTTP verb. By the way, macros are evaluated at compile-time, meaning that they have no performance penalty.<\/p>\n<blockquote><p>Compile to efficient native code.<\/p><\/blockquote>\n<p>Crystal is a compiled language. I\u2019m not gonna dive into the advantages of having a compiler, but I can easily say that it gives you a lot of optimizations for free. In addition, when a Crystal program is compiled, it\u2019s an efficient single file, native code. It\u2019s super convenient and easy to run\/deploy.<\/p>\n<p>Here\u2019s how you compile your Crystal program.<\/p>\n<pre class=\"brush:php\">crystal build program.cr<\/pre>\n<p>it produces a single, executable, native binary with the same name that you can run with:<\/p>\n<pre class=\"brush:php\">.\/program<\/pre>\n<p>Awesome!<\/p>\n<h2>Crystal\u2019s Fantastic Standard Library<\/h2>\n<p>Crystal comes with a great standard library and tools. It has all the stuff you need to build modern applications. CSV, YAML, JSON, HTTP, and even WebSocket are bundled with Crystal itself, making it super simple to start building something.<\/p>\n<p>Need a web server? No problem!<\/p>\n<pre class=\"brush:php\"># server.cr\r\nrequire \"http\/server\"\r\n\r\nserver = HTTP::Server.new(8080) do |context|\r\n  context.response.content_type = \"text\/plain\"\r\n  context.response.print \"Hello world, got #{context.request.path}!\"\r\nend\r\n\r\nputs \"Listening on http:\/\/0.0.0.0:8080\"\r\nserver.listen<\/pre>\n<p>It\u2019s just 5 LOC to build a functional web server: <code>crystal server.cr<\/code>. Go to <code>localhost:8080<\/code>.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_http_server.png\"><img decoding=\"async\" class=\"aligncenter wp-image-14333\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_http_server.png\" alt=\"crystal_http_server\" width=\"860\" height=\"587\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_http_server.png 1172w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_http_server-300x205.png 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_http_server-768x524.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_http_server-1024x699.png 1024w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<p>The <code>crystal<\/code> command itself is also really useful. It even has a built-in code formatter that you can use: <code>crystal tool format your_app.cr<\/code>.<\/p>\n<p>The most amazing command is the <code>crystal play<\/code>. It\u2019s basically a playground to quickly run some Crystal code and get instant feedback. Just run it and go to <code>localhost:8080<\/code>.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/vbkQMCdDTc.gif\"><img decoding=\"async\" class=\"aligncenter wp-image-14334\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/vbkQMCdDTc.gif\" alt=\"vbkQMCdDTc\" width=\"860\" height=\"482\" \/><\/a><\/p>\n<h2>Crystal\u2019s Performance<\/h2>\n<p>Crystal has a unique goal of being as slick as Ruby but with performance.<\/p>\n<blockquote><p>I love benchmarks, but remember, benchmarks should be taken with a grain of salt.<\/p><\/blockquote>\n<p>This is a naive Fibonacci implementation for Crystal (it\u2019s also valid Ruby):<\/p>\n<pre class=\"brush:php\"># fib.cr\r\ndef fib(n)\r\n  if n &lt;= 1\r\n    1\r\n  else\r\n    fib(n - 1) + fib(n - 2)\r\n  end\r\nend\r\n\r\nputs fib(42)<\/pre>\n<p>Let\u2019s run it and see how long it takes!<\/p>\n<pre class=\"brush:php\">time crystal fib.cr\r\n433494437\r\ncrystal fib.cr  2.45s user 0.33s system 98% cpu 2.833 total<\/pre>\n<p>Since this is also valid Ruby, let\u2019s run it with Ruby this time<\/p>\n<pre class=\"brush:php\">time ruby fib.cr\r\n433494437\r\nruby fib.cr  38.49s user 0.12s system 99% cpu 38.718 total<\/pre>\n<p>Crystal took 2.833 seconds to complete. Ruby took 38.718 seconds to complete. Pretty cool. We get 20x performance for free. What if we compile our program with optimizations turned on?<\/p>\n<pre class=\"brush:php\">crystal build --release fib.cr<\/pre>\n<pre class=\"brush:php\">time .\/fib\r\n433494437\r\n.\/fib  1.11s user 0.00s system 99% cpu 1.113 total<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_vs_ruby_benchmark.png\"><img decoding=\"async\" class=\"aligncenter wp-image-14335\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_vs_ruby_benchmark.png\" alt=\"crystal_vs_ruby_benchmark\" width=\"860\" height=\"482\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_vs_ruby_benchmark.png 1280w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_vs_ruby_benchmark-300x168.png 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_vs_ruby_benchmark-768x430.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/08\/crystal_vs_ruby_benchmark-1024x574.png 1024w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<p>1.113 seconds. Now we\u2019re nearly 35 times faster than Ruby. Isn\u2019t that cool? This is what I am talking about! The Crystal compiler uses LLVM to do really good optimizations.<\/p>\n<p>If you\u2019re really into benchmarks (like I am), you should check out the <a href=\"https:\/\/github.com\/kostya\/crystal-benchmarks-game\">crystal-benchmarks-game<\/a> repository.<\/p>\n<blockquote><p>Remember: <a href=\"http:\/\/theportalwiki.com\/wiki\/Cake\">The cake is a lie<\/a>, and so are benchmarks. You won\u2019t have 35x increase in performance all the time, but you can expect 5x or more in complex applications, more if it\u2019s CPU intensive.<\/p><\/blockquote>\n<h2>Concurrency in Crystal<\/h2>\n<p>In Crystal, we use the keyword <code>spawn<\/code> to make something work in the background (<em>a.k.a.<\/em>, async) without blocking the main execution. To achieve this, <code>spawn<\/code> creates a lightweight thread called Fiber. Fibers are very cheap to create, and their execution is managed internally by the process. You can easily create tens of thousands of Fibers on a single core.<\/p>\n<p>Okay, we can use <code>spawn<\/code> to make stuff work in the background, but how do we send\/receive something from a Fiber? That\u2019s where Channels come into play. If you\u2019re familiar with <code>Channels<\/code> from Go, then you\u2019ll feel right at home.<\/p>\n<p>Fibers can execute and keep sending messages through the Channels. Execution control is yielded to whoever is expecting to receive from the same Channels. Once one of them receives and executes, control is sent back to the Scheduler to allow other spawned Fibers to execute. They can keep \u201cpinging\u201d and \u201cponging\u201d like this.<\/p>\n<p>Speaking of ping-pong, you have <a href=\"https:\/\/gobyexample.com\/channel-directions\">this snippet from the \u201cGo by Example\u201d<\/a> site:<\/p>\n<pre class=\"brush:php\">package main\r\nimport \"fmt\"\r\n\r\nfunc ping(pings chan&lt;- string, msg string) {\r\n    pings &lt;- msg\r\n}\r\n\r\nfunc pong(pings &lt;-chan string, pongs chan&lt;- string) {\r\n    msg := &lt;-pings\r\n    pongs &lt;- msg\r\n}\r\n\r\nfunc main() {\r\n    pings := make(chan string, 1)\r\n    pongs := make(chan string, 1)\r\n    ping(pings, \"passed message\")\r\n    pong(pings, pongs)\r\n    fmt.Println(&lt;-pongs)\r\n}<\/pre>\n<p>And the Crystal version:<\/p>\n<pre class=\"brush:php\">def ping(pings, message)\r\n  pings.send message\r\nend\r\n\r\ndef pong(pings, pongs)\r\n  message = pings.receive\r\n  pongs.send message\r\nend\r\n\r\npings = Channel(String).new\r\npongs = Channel(String).new\r\nspawn ping pings, \"passed message\"\r\nspawn pong pings, pongs\r\nputs pongs.receive # =&gt; \"passed message\"<\/pre>\n<p>The Crystal version feels more natural and easy to read for me. I think most Rubyists will feel the same.<\/p>\n<h2>Crystal: Not Just for Rubyists<\/h2>\n<p>Crystal is a simple, easy-to-learn, high-performant, general programming language that uniquely combines all of these without any compromise. It\u2019s not just for Rubyists!<\/p>\n<p>So what can you build with Crystal? Games, graphic renderers, low-level agents, web applications, and much more. It\u2019s really up to you what your next shiny project will be in Crystal! If you\u2019d like to explore some projects built with Crystal, check out &lt;crystalshards.xyz&gt;. It\u2019s a great place to discover Crystal projects.<\/p>\n<blockquote><p>Bonus: If you can\u2019t find a name for your next project, try the <a href=\"http:\/\/crystalshards.xyz\/name\">name generator<\/a>!<\/p><\/blockquote>\n<h2>Resources<\/h2>\n<p>If you\u2019ve made it this far, you might be asking, \u201cWhere do I go next?\u201d Of course, the official <a href=\"https:\/\/crystal-lang.org\/docs\/\">Crystal book<\/a> is a great place to start learning. <a href=\"http:\/\/www.crystalforrubyists.com\/\"><em>Crystal for Rubyists<\/em><\/a> is a free book to bootstrap your Crystal journey, and Crystal has an active <a href=\"https:\/\/gitter.im\/crystal-lang\/crystal\">Gitter<\/a> room for communication. See you there!<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/blog.codeship.com\/an-introduction-to-crystal-fast-as-c-slick-as-ruby\/\">An Introduction to Crystal: Fast as C, Slick as Ruby<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a> Serdar Do\u011fruyol at the <a href=\"http:\/\/blog.codeship.com\/\">Codeship Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby professionally, and I\u2019d really like to keep it that way. But I\u2019m also aware that languages and tools are destined to be replaced. Ruby is awesome, but it\u2019s not &hellip;<\/p>\n","protected":false},"author":176,"featured_media":927,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[386],"class_list":["post-14309","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development","tag-crystal"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>An Introduction to Crystal: Fast as C, Slick as Ruby - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An Introduction to Crystal: Fast as C, Slick as Ruby - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-04T09:15:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Serdar Do\u011fruyol\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serdar Do\u011fruyol\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/\"},\"author\":{\"name\":\"Serdar Do\u011fruyol\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/ea594b7863c6e0981804c62d14020b5c\"},\"headline\":\"An Introduction to Crystal: Fast as C, Slick as Ruby\",\"datePublished\":\"2016-08-04T09:15:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/\"},\"wordCount\":1188,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"keywords\":[\"Crystal\"],\"articleSection\":[\"Web Dev\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/\",\"name\":\"An Introduction to Crystal: Fast as C, Slick as Ruby - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"datePublished\":\"2016-08-04T09:15:27+00:00\",\"description\":\"I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Dev\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/web-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"An Introduction to Crystal: Fast as C, Slick as Ruby\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/ea594b7863c6e0981804c62d14020b5c\",\"name\":\"Serdar Do\u011fruyol\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7e62f1669f85c4ee0b52b9f8e47910ae6c83a4ecf19b990adc458f44c80f1481?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7e62f1669f85c4ee0b52b9f8e47910ae6c83a4ecf19b990adc458f44c80f1481?s=96&d=mm&r=g\",\"caption\":\"Serdar Do\u011fruyol\"},\"description\":\"Serdar Do\u011fruyol is a lead at Protel, the creator of Kemal, a Rubyist, and a Crystal evangelist.\",\"url\":\"https:\/\/www.webcodegeeks.com\/author\/serdar-dogruyol\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"An Introduction to Crystal: Fast as C, Slick as Ruby - Web Code Geeks - 2026","description":"I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/","og_locale":"en_US","og_type":"article","og_title":"An Introduction to Crystal: Fast as C, Slick as Ruby - Web Code Geeks - 2026","og_description":"I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby","og_url":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2016-08-04T09:15:27+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","type":"image\/jpeg"}],"author":"Serdar Do\u011fruyol","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Serdar Do\u011fruyol","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/"},"author":{"name":"Serdar Do\u011fruyol","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/ea594b7863c6e0981804c62d14020b5c"},"headline":"An Introduction to Crystal: Fast as C, Slick as Ruby","datePublished":"2016-08-04T09:15:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/"},"wordCount":1188,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","keywords":["Crystal"],"articleSection":["Web Dev"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/","url":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/","name":"An Introduction to Crystal: Fast as C, Slick as Ruby - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","datePublished":"2016-08-04T09:15:27+00:00","description":"I\u2019m a Rubyist. I love Ruby, the community, the productivity, and so many other things about it. For more than four years now, I\u2019ve written Ruby","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/web-dev-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/web-development\/introduction-crystal-fast-c-slick-ruby\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Web Dev","item":"https:\/\/www.webcodegeeks.com\/category\/web-development\/"},{"@type":"ListItem","position":3,"name":"An Introduction to Crystal: Fast as C, Slick as Ruby"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/ea594b7863c6e0981804c62d14020b5c","name":"Serdar Do\u011fruyol","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7e62f1669f85c4ee0b52b9f8e47910ae6c83a4ecf19b990adc458f44c80f1481?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7e62f1669f85c4ee0b52b9f8e47910ae6c83a4ecf19b990adc458f44c80f1481?s=96&d=mm&r=g","caption":"Serdar Do\u011fruyol"},"description":"Serdar Do\u011fruyol is a lead at Protel, the creator of Kemal, a Rubyist, and a Crystal evangelist.","url":"https:\/\/www.webcodegeeks.com\/author\/serdar-dogruyol\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/14309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/176"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=14309"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/14309\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/927"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=14309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=14309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=14309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}