crystal-ruby-tuesday

Code from "Crystal For Rubyists" presentation at Ruby Tuesday Bangkok

Ruby Tuesday, 20180925

Overview

Have a syntax similar to Ruby (but compatibility with it is not a goal).

Be statically type-checked, but without having to specify the type of variables or method arguments.

Be able to call C code by writing bindings to it in Crystal.

Have compile-time evaluation and generation of code, to avoid boilerplate code.

Crystal uses green threads, called fibers, to achieve concurrency. Fibers communicate with each other using channels, as in Go.

Compile to efficient native code (based on LLVM)

$ crystal build 12-c-extensions.cr -o test  --cross-compile --target "x86_64-unknown-linux-gnu"
cc 'test.o' -o 'test'  -rdynamic  -lncurses -lpcre -lgc -lpthread /usr/local/Cellar/crystal/0.26.1/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib

Resources

Repository

crystal-ruby-tuesday

Owner
Statistic
  • 10
  • 0
  • 0
  • 0
  • 0
  • over 6 years ago
  • September 26, 2018
License

Links
Synced at

Wed, 04 Jun 2025 06:54:05 GMT

Languages