5 ms·
I can understand the reasons why people prefer to target the CLR/JVM/LLVM/BEAM/Name-your-favorite-vm but I yearn for more compiled-to-native-languages such as G
by Immortalin 12y ago
I can understand the reasons why people prefer to target the CLR/JVM/LLVM/BEAM/Name-your-favorite-vm but I yearn for more compiled-to-native-languages such as Golang. As attractive as partially-compiled/interpretated languages are, I simply do not enjoy creating programs in a language that can be decompiled to source so easily. We need more languages that have decent performance instead of having to drop down to pointer optimizing in C wherever we need some performance. A functional Fortran would certainly be nice...
- one-more-minute 12y agoHave you met Julia? I don't know if I'd quite call it a functional Fortran, but it's not that far off, either.
- tempodox 12y agoSadly, Julia will not produce stand-alone executables in the foreseeable future. It's nothing more than a bit of native glue between two Python scripts. The main acceptance group doesn't use it for production, only in the lab.
- one-more-minute 12y agoStand-alone executables are on the roadmap for Julia 0.4, which is on the horizon (next six months or so).
- agentultra 12y agoSome Common Lisp implementations do compile down to machine code. An example of one I'm told is quite good is SBCL: * (disassemble #'(lambda () (loop for i from 1 upto 10 summing i))) ; disassembly for (LAMBDA ()) ; Size: 62 bytes. Origin: #x100306FE84 ; 84: BB02000000 MOV EBX, 2 ; no-arg-parsing entry point ; 89: 31C9 XOR ECX, ECX ; 8B: EB21 JMP L1 ; 8D: 0F1F00 NOP ; 90: L0: 48895DF8 MOV [RBP-8], RBX ; 94: 488BD1 MOV RDX, RCX ; 97: 488BFB MOV RDI, RBX ; 9A: 41BBA0010020 MOV R11D, 536871328 ; GENERIC-+ ; A0: 41FFD3 CALL R11 ; A3: 488BCA MOV RCX, RDX ; A6: 488B5DF8 MOV RBX, [RBP-8] ; AA: 4883C302 ADD RBX, 2 ; AE: L1: 4883FB14 CMP RBX, 20 ; B2: 7EDC JLE L0 ; B4: 488BD1 MOV RDX, RCX ; B7: 488BE5 MOV RSP, RBP ; BA: F8 CLC ; BB: 5D POP RBP ; BC: C3 RET ; BD: CC0A BREAK 10 ; error trap ; BF: 02 BYTE #X02 ; C0: 19 BYTE #X19 ; INVALID-ARG-COUNT-ERROR ; C1: 9A BYTE #X9A ; RCX Keep in mind that's with full run-time type checking and other nice debugging features. You can hint the compiler to turn these things off in your hardened code sections for even smaller, tighter code.
- Moyamo 12y agoI think the parent comment about VMs was aimed at clojure.
- elektronjunge 12y agoLLVM isn't a vm like the others, its a generic compiler backend. Languages with LLVM backing generally compile to native.
- bmh100 12y agoBy functional Fortran, do you mean like a "functional programming language" or "more productive Fortran"? As one who has developed in Fortran before, I would also like to see enhanced functional capabilities, as well as a more productive way to write code. I have spent so much time on declaring variables and function arguments over and over across subroutines that it becomes quite a pain. To avoid writing many subroutine interfaces, I also tend to put everything in a single module. My dream is to combine the expressiveness of Lisp with the numerical performance and memory efficiency of Fortran and C.
- phabian 12y agoWhat happened with Fortress, fortran like enchanced language Guy Steele was developing with his team?
- bmh100 12y agoI had not heard of Fortress before. It seems that Oracle's sponsorship of the project ended in 2012. Guy Steele emphasizes the difficulty of implementing Fortress's type system on virtual machines. [1] [1]: https://blogs.oracle.com/projectfortress/entry/fortress_wrapping_up https://blogs.oracle.com/projectfortress/entry/fortress_wrap...
- Immortalin 12y agoBoth :D