3 ms·
The one issue you seem to consider as not relevant at all is the effort it takes to implement a 'fast enough' language. With RPython as well as with Truffle+Gra
by smarr 12y ago
The one issue you seem to consider as not relevant at all is the effort it takes to implement a 'fast enough' language. With RPython as well as with Truffle+Graal, you can implement a language in less than 10k lines of code and get performance within reach of state of the art VMs.
Sure, if you prefer more static languages, you can probably move the point of optimization from runtime to compile time. However, I would like to see that you can achieve the same degree of performance by using LLVM for a small language also in the range of 5k-10k LOC. I am not aware of any similar experiments in that field.
Rust, Go, or Julia seem to be all larger and more complex languages, so a direct comparison isn't really fair.
Would be interested if there is something out there I have missed so far.
- ihnorton 12y agoThis paper was an interesting read! And thank you for the exceptionally well-selected references: I think I will enjoy reading several of those. I'm not sure about the others, but as far as Julia goes, the main parts of the language implementation are: parser and lowering in about 5000 lines of Scheme; type inference is 3k lines of Julia; and codegen to LLVM is about 6000 SLOC of C++. (and then there are a few tens of thousands of LOC of runtime and library code in C and Julia). I suspect it would be possible to implement a nice, smallish, LLVM-backed DSL using the Ocaml bindings in well under 10k lines, but I am likewise unaware of such an experiment. On the other hand, implementing Julia in Truffle or RPython would be a neat project.
- acqq 12y agoAs far as I understand, Julia is the language that will certainly be a worthy replacement of Python once it gets enough library functionality (I admit actually didn't follow how much it gets, I'd appreciate if somebody writes the current state). It's really nice that it was designed from the start to be fast.
- ihnorton 12y agoIt really depends what libraries you need. You might be interested in: http://pkg.julialang.org/pulse.html http://pkg.julialang.org/pulse.html (also a searchable package list).
- vbit 12y agoHave you looked at http://terralang.org/ http://terralang.org/ ? It may be a good toolchain if you're targetting static compilation using the LLVM.
- acqq 12y agoYou're right, I'm looking at the presented topic from the point of view of the language user, not the point of view of a developer of the experimental language. And as the language user I have really big expectations to even consider using it. I also expect that as soon as somebody starts to design the language based on the big infrastructure behind it, the result will be some not too important variation of the existing stuff: if he depends on the PyPy he's probably just making some sugared version of already existing dynamic languages (Python, Ruby etc). It's not that I don't use dynamic langauges, it's just that I look at them too as "what they can do for me." If it's the shortest thing to do, I'll still write a few lines of awk. Then, if it's text processing, I'll probably still use Perl. I used Python for some very small simple GUI apps in it, or for having a SciPy and matplotlib and stuff. I use Lua from time to time in SciTe. The real progress is hard. But don't let that prevent you from experimenting. Good luck!