4 ms·
From crystal-lang.org, Crystal is a compiled language I never understood the phrase compiled language.
by sigjuice 9y ago
From crystal-lang.org, Crystal is a compiled language
I never understood the phrase compiled language.
- goatlover 9y agoA compiled language uses a compiler to create a executable binary as opposed to a runtime that interprets or just-in-time compiles the language as it runs. Ruby is interpreted, C is compiled. Generally speaking, compiled languages are more performant but lack some of the flexibility of having a runtime available. Crystal sacrifices some of Ruby's metaprogramming capabilities for performance and static type assurances.
- sigjuice 9y agoThere are many C interpreters.
- exikyut 9y agoI'm aware of PicoC, Cling (nee CINT), and Ch (commercial), but that's only three. What others are there? I'm curious about canonical C interpreters as well as things that aren't quite interpreting C but are somehow related.
- sigjuice 9y agoHere is another http://compcert.inria.fr http://compcert.inria.fr [08/2011] Release of version 1.9 of the Compcert C compiler. Novelties include a reference C interpreter and stronger semantic preservation results.
- exikyut 9y agoOh, another C compiler! I like collecting these - thanks! :) Question for anyone handing out unofficial legal opinions: This one is dual-licensed. There are a small kerfuffle of custom licenses that say "no commercial use", but everything is also variously covered by the GPL (v2 or later), LGPL v3, and BSD 3-clause. Ref: https://github.com/AbsInt/CompCert/blob/master/LICENSE https://github.com/AbsInt/CompCert/blob/master/LICENSE I'm curious if I could use this in a commercial setting if I perfectly comply with the various GPL and BSD licenses. If I could, that could be a problem for this group, because the repo readme (at https://github.com/AbsInt/CompCert https://github.com/AbsInt/CompCert) explicitly states "this is not free software."
- homarp 9y agotcc ? https://bellard.org/tcc/ https://bellard.org/tcc/ has: C script supported : just add '#!/usr/local/bin/tcc -run' at the first line of your C source, and execute it directly from the command line.
- exikyut 9y agoAh, I forgot tcc. Such an amazing system, so sad that development stalled. FWIW, I think tcc compiles into RAM, then jmp-s to the result. Pretty much just eliminates the creation of an output file.
- deleted 9y ago[deleted]
- mark_edward 9y agoDo you genuinely not understand what they mean (that it produces binaries and isn't run in an interpreter or VM)?
- mclehman 9y agoI think their aim was to highlight the distinction between a language and an implementation of that language and possibly argue that only a particular implementation should be referred to as compiled/interpreted.
- sigjuice 9y agoWhat I understand is that they invented a language called Crystal. And they made a compiler for it. The phrase "compiled language" is not very meaningful. It is quite possible for someone to make a Crystal interpreter.
- goatlover 9y agoSure, but the goal of the language creator is to create a compiled Ruby-like language. As such, Crystal is by design meant to be compiled. Which is also the case for languages like C, C++, Go, etc.
- sigjuice 9y agoWhat properties of C indicate that it is meant to be compiled? The word "compiler" does not appear in the ISO/IEC 9899:1999 standard (aka C99) in any meaningful way (there is just one sentence in a footnote).