[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music ] [ meta / roulette ] [ cytube / git ] [ GET / ref / booru ]

/tech/ - Technology

"Technology reveals the active relation of man to nature"
Password (For file deletion.)

New Announcement: IRC<=>Matrix bridge #leftypol on Rizon
Please give feedback on proposals, new every Monday : /meta/
/edu/ want your help building a library! >>>/edu/7066
New /roulette/ topic: /draw/ - Original Art


What's everyone think of this language? looks like a statically typed, compiled version of ruby?


>Although resembling the Ruby language in syntax, Crystal compiles to much more efficient native code using an LLVM backend, at the cost of precluding the dynamic aspects of Ruby. However, the advanced global type inference used by the Crystal compiler, combined with the use of union types, gives Crystal the feel of a higher-level scripting language more so than many other comparable programming languages. The language has automated garbage collection and currently offers a Boehm collector. Crystal possesses a macro system and supports generics as well as both method and operator overloading. Crystal's concurrency model is inspired by communicating sequential processes (CSP) and implements light-weight fibers and channels (for communicating between fibers) inspired by Go.


Never used it. Ruby became a language people used because of rails. There was a boom of software shops popping up because they could push web apps really quickly with rails. Personally, I really dislike rails.
Python's Django y much less "magic" and much nicer in general.

What's crystal dev environment like?


It's the least blub language of all languages out there. People are apprehensive to trying it out because they keep their minds in an enclosed blubhole, but they're all wrong and missing out on this truly unique Gem in the rough, the eternal crystal castle of Babylon is held within its perfect, crystalized syntax. Stop fighting your nature and use a chi- crystal.


Invidious, the youtube frontend, is written in crystal.




Can it compile to binary/metal (I forgot the proper term) instead of LLVM?


Despite having its own language, LLVM is a compiler infrastructure first and foremost.
The manpage of crystal also says it to compile to native code by default:
>CRYSTAL(1) Crystal Compiler Command Line Reference Guide CRYSTAL(1)
>crystal – Compiler for the Crystal language.
>crystal command [switches] programfile – [arguments]
>Crystal is a statically type-checked programming language. It was created
>with the beauty of Ruby and the performance of C in mind.
>You can compile and run a program by invoking the compiler with a single
>crystal some_program.cr
>Crystal files usually end with the .cr extension, though this is not
>Alternatively you can use the run command:
>crystal run some_program.cr
>To create an executable use the build command:
>crystal build some_program.cr
>This will create an executable named "some_program".
>https://crystal-lang.org/ The official web site.
>https://github.com/crystal-lang/crystal Official Repository.


Kinda nice but I don't think you can use existing Ruby libs because Crystal's stdlib is slightly different.


True, but that turned out to be a major problem when the original dev stepped down from the project. Look up old issues in the github repo around that time. People mass-complained about the language choice, and it looked like the project might die very soon because nobody could fix anything. Invidious is the kind of thing that needs incessant changes because it's playing cat and mouse with Youtube.

Fortunately the current devs are extremely active and will also test and merge your patches very quickly, so it wasn't that fatal.

Unique IPs: 5

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music ] [ meta / roulette ] [ cytube / git ] [ GET / ref / booru ]