[ 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"
Name
Email
Subject
Comment
Flag
File
Embed
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


 No.12001

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

 No.12002

>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.

 No.12003

>>12002
>>12001
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?

 No.12047

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.

 No.12048

Invidious, the youtube frontend, is written in crystal.
https://github.com/iv-org/invidious

 No.12049

>>12048
cool.

 No.12063

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

 No.12064

>>12063
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)
>
>NAME
>crystal – Compiler for the Crystal language.
>
>SYNOPSIS
>crystal command [switches] programfile – [arguments]
>
>DESCRIPTION
>Crystal is a statically type-checked programming language. It was created
>with the beauty of Ruby and the performance of C in mind.
>
>USAGE
>You can compile and run a program by invoking the compiler with a single
>filename:
>
>crystal some_program.cr
>
>Crystal files usually end with the .cr extension, though this is not
>mandatory.
>
>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.
>
>UNIX Epoch UNIX

 No.12068

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

 No.12072

>>12048
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 ]