4 ms·
Crystal & Julia 1.0. Crystal because it's a blazing fast, compiled and statically typed version of Ruby (or 80% anyway), and it's web server is awesome. Now it
by goatlover 9y ago
Crystal & Julia 1.0. Crystal because it's a blazing fast, compiled and statically typed version of Ruby (or 80% anyway), and it's web server is awesome. Now it just needs full concurrency.
Julia because it offers a nice, performant alternative to Python & R in data science, while avoiding Java & C++. It has some really nice features like multiple dispatch and the ability to run R, Python, Fortran and C code inside of it, so you can use libraries like Numpy in Julia.
- mirekrusin 9y agoYes, can't wait for Crystal 1.0 release, awesome language.
- sigjuice 9y agoFrom 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).
- dnautics 9y agoI was choosing between Crystal and elixir for my personal edification and I picked elixir.
- goatlover 9y agoElixir looks really interesting as well. I just hope it leaves some Rubyists behind for Crystal. The reason I prefer Crystal is that I really like Ruby, and Elixir is a much different language. And then there is Ruby 3.0, which will have concurrency and (optional) static types according to Matz. But that's slated for 2020.
- devmunchies 9y agoSafe choice. I Like both, and Crystal is definitely faster, but its not as developed as Elixir as far as ecosystem maturity or community.
- tnecniv 9y agoI can't wait to never use MATLAB again.
- auxym 9y agoWhat's keeping you on Matlab? In my experience it's mostly the domain-specific libraries or Simulink. The core matrix-y stuff can pretty much all be ported to Python with similar or better perfomance, especially using Numba.
- phkahler 9y agoDon't forget the core matrix-y stuff can be directly run in Octave. But that's just a cost issue, it doesn't get away from the weird language.
- tnecniv 9y agoPart of it is me inheriting a legacy code base and part of it is the fact that it is easier to collaborate with members of my field using MATLAB as it is common knowledge. Python is fine, but I do like having matrices as first-party language members -- that's just a nitpick though. I'm starting a new project soon that I intend to do in Julia because it seems to have everything I like from Python and MATLAB combined.
- uyhso8 9y agoNot trying to be a troll, but... I was on the Julia train full-force until I started using it more heavily. My sense is that the benchmarks are a little misleading. These benchmarks give a little flavor of what I'm talking about: https://github.com/kostya/benchmarks https://github.com/kostya/benchmarks If you look at them, you'll see that Julia is indeed crazy fast in some cases. But in other cases, the performance is kind of middling. The native threads implementation of matmul is obscenely fast, but the "pure Julia" implementation is pretty slow--faster than R or Python for sure, but not in the same ballpark as C. You could argue "well, why would you not use the native threads implementation in that case?" However, for someone implementing a routine in Julia, the implementation would be the pure one. That's the point. With something like Rust, or Crystal, or Nim, what is promised is basically what you get: something in the ballpark of C. But with Julia, I feel like it's kind of unpredictable. The problem is that the slow parts end up being a bottleneck that slows down the rest of the code, and that slow code is slow enough that it's not worth it relative to C or Python/R. That is, if you're writing heavy numerics, when you get to 20x slower than C, you might as well write it in C (or Rust or Crystal or Nim), and wrap Python or R around it, because that 20x is enough to kill it. At that point you might as well go with the established language even though it's 100x slower as an interface, and use something fast for the heavy lifting. Crystal I can't say much about. It seems great, but the "everything is an object" makes me nervous--I tend to get anxious about inheritance because it drives me nuts. Nim seems more attractive to me. But who knows--it's also not like you can't have more than one language out there.
- goatlover 9y agoI see, thanks for that info on Julia's performance. As for OOP, I feel like that's more a matter of preference. I don't buy the functional is better (generally speaking not specific situations where it might be). But I could be wrong, I just don't see evidence, only anecdotal claims by fans of functional programming (which doesn't mean they're wrong only that I'm not convinced). To be fair, they have arguments against OOP in favor of functional, but I'm not personally sold. Or maybe I just like Ruby and it's approach to OOP.
- uyhso8 9y ago