News for hackers. Stuff that matters.
Re:Ask HN: What tech that's right around the corner are you ... by goatlover on Friday August 04, 2017 @05:06PM (#14932264)
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.

Re:Ask HN: What tech that's right around the corner are you ... by uyhso8 on Friday August 04, 2017 @06:55PM (#14933044)
Not 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

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.

Re:Ask HN: What tech that's right around the corner are you ... by goatlover on Friday August 04, 2017 @07:26PM (#14933211)
I 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.

Re:Ask HN: What tech that's right around the corner are you ... by uyhso8 on Saturday August 05, 2017 @01:47AM (#14934397)
Ruby did/does have a nice OOP approach. I remember when Python and Ruby were first kind of being touted as alternatives to Perl, and Ruby always seemed more well-thought out to me--the Python 2-3 split was something I sort of saw coming.

I wouldn't say I'm a functional purist (at least so far), but inheritance in particular has caused me some headaches in the past. I like Rust's approach to all of that, but it's much lower level.

Honestly, if Crystal ended up taking over the programming world, I wouldn't mind. Its a very nice language with a lot of advantages over what people are using now.

Re:Ask HN: What tech that's right around the corner are you ... by mirekrusin on Friday August 04, 2017 @05:22PM (#14932395)
Yes, can't wait for Crystal 1.0 release, awesome language.
Re:Ask HN: What tech that's right around the corner are you ... by sigjuice on Friday August 04, 2017 @05:50PM (#14932628)
From crystal-lang.org, Crystal is a compiled language

I never understood the phrase compiled language.

Re:Ask HN: What tech that's right around the corner are you ... by goatlover on Friday August 04, 2017 @06:00PM (#14932703)
A 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.

Re:Ask HN: What tech that's right around the corner are you ... by sigjuice on Friday August 04, 2017 @09:10PM (#14933676)
There are many C interpreters.
Re:Ask HN: What tech that's right around the corner are you ... by exikyut on Friday August 04, 2017 @10:14PM (#14933869)
I'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.
Re:Ask HN: What tech that's right around the corner are you ... by sigjuice on Friday August 04, 2017 @11:34PM (#14934090)
Here is another 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.

Re:Ask HN: What tech that's right around the corner are you ... by exikyut on Saturday August 05, 2017 @04:58AM (#14934867)
Oh, 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

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) explicitly states "this is not free software."

Re:Ask HN: What tech that's right around the corner are you ... by homarp on Saturday August 05, 2017 @12:30AM (#14934236)
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.

Re:Ask HN: What tech that's right around the corner are you ... by exikyut on Saturday August 05, 2017 @04:52AM (#14934844)
Ah, 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.

Re:Ask HN: What tech that's right around the corner are you ... by mark_edward on Friday August 04, 2017 @06:15PM (#14932807)
Do you genuinely not understand what they mean (that it produces binaries and isn't run in an interpreter or VM)?
Re:Ask HN: What tech that's right around the corner are you ... by mclehman on Friday August 04, 2017 @07:09PM (#14933122)
I 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.
Re:Ask HN: What tech that's right around the corner are you ... by sigjuice on Friday August 04, 2017 @09:16PM (#14933706)
What 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.
Re:Ask HN: What tech that's right around the corner are you ... by goatlover on Friday August 04, 2017 @10:02PM (#14933849)
Sure, 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.
Re:Ask HN: What tech that's right around the corner are you ... by sigjuice on Friday August 04, 2017 @11:49PM (#14934125)
What 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).
Re:Ask HN: What tech that's right around the corner are you ... by goatlover on Saturday August 05, 2017 @12:16AM (#14934188)
That it's fairly close to assembly for a high level language, and most C that has ever been written has been compiled.
Re:Ask HN: What tech that's right around the corner are you ... by sigjuice on Saturday August 05, 2017 @12:27AM (#14934230)
Okay, but it still seems strange to claim compiled-ness as some sort of intrinsic property of a language.
Re:Ask HN: What tech that's right around the corner are you ... by goatlover on Saturday August 05, 2017 @01:05AM (#14934318)
It's more a general descriptive of languages designed with compilation in mind.
Re:Ask HN: What tech that's right around the corner are you ... by tnecniv on Friday August 04, 2017 @06:13PM (#14932797)
I can't wait to never use MATLAB again.
Re:Ask HN: What tech that's right around the corner are you ... by auxym on Saturday August 05, 2017 @07:42AM (#14935282)
What'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.

Re:Ask HN: What tech that's right around the corner are you ... by tnecniv on Sunday August 06, 2017 @08:58PM (#14944595)
Part 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.

Re:Ask HN: What tech that's right around the corner are you ... by phkahler on Saturday August 05, 2017 @08:46AM (#14935440)
Don'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.
Re:Ask HN: What tech that's right around the corner are you ... by dnautics on Friday August 04, 2017 @05:51PM (#14932635)
I was choosing between Crystal and elixir for my personal edification and I picked elixir.
Re:Ask HN: What tech that's right around the corner are you ... by goatlover on Friday August 04, 2017 @05:55PM (#14932669)
Elixir 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.

Re:Ask HN: What tech that's right around the corner are you ... by devmunchies on Friday August 04, 2017 @06:24PM (#14932867)
Safe choice. I Like both, and Crystal is definitely faster, but its not as developed as Elixir as far as ecosystem maturity or community.