News for hackers. Stuff that matters.
Re:Rhine – A Lisp on LLVM by charlieflowers on Saturday September 06, 2014 @12:09AM (#8277493)
I think the holy grail may be the combination of working in a very expressive high level language, but knowing and seeing exactly what that generates at the low level. (And in those few cases where it matters, being able to control/influence/change what it generates at the low level).

So this sounds pretty interesting.

Re:Rhine – A Lisp on LLVM by shortsightedsid on Saturday September 06, 2014 @12:37AM (#8277548)
FWIW, SBCL does exactly that. You can defun a function and disassemble it right down to assembly. What this project does is slightly different which is to use LLVM to achieve the same thing.
Re:Rhine – A Lisp on LLVM by dedward on Saturday September 06, 2014 @10:41PM (#8280164)
FYI - that disassemble feature is part of the CL spec - it's not unique to SBCL.

http://www.lispworks.com/documentation/HyperSpec/Body/f_disa...

Re:Rhine – A Lisp on LLVM by charlieflowers on Saturday September 06, 2014 @12:24PM (#8278697)
Yeah I realize that, but good point. LLVM is very interesting to me, but you're right that it's not as utterly low level as native assembly. It is the most interesting assembly ("assembly-like"?) language to me at this time.

I didn't know SBCL did that. Cool.

Re:Rhine – A Lisp on LLVM by enupten on Saturday September 06, 2014 @10:39PM (#8280162)
All CL's have a #'disassemble, although the output of it is left undefined.
Re:Rhine – A Lisp on LLVM by sqrt17 on Saturday September 06, 2014 @06:45AM (#8278006)
To use LLVM to achieve the same thing would be to find a way to bootstrap SBCL through LLVM, which would, again, be very cool.
Re:Rhine – A Lisp on LLVM by _delirium on Saturday September 06, 2014 @11:51AM (#8278604)
There are occasional discussions on sbcl-devel about it, but I'm not aware of anyone committing serious resources to it (it's not really a weekend-project, or even single-GSoC-student, amount of work). There is also some skepticism about whether it's worth doing at all, because of worries that it will be difficult to get good GC performance out of LLVM: http://marc.info/?l=sbcl-devel&m=136219729420475&w=2

(Reference [1] in that email points to: https://github.com/elliottslaughter/rust-gc-notes, which documents difficulties trying to build a precise GC for Rust on top of LLVM.)

Re:Rhine – A Lisp on LLVM by hga on Saturday September 06, 2014 @12:51PM (#8278764)
Simply doing a correct precise GC with LLVM is still a work in progress: http://www.philipreames.com/Blog/
Re:Rhine – A Lisp on LLVM by _delirium on Saturday September 06, 2014 @01:14PM (#8278826)
Taking GC seriously in the design of a low-level compiler-target language was one of the aspects that I found very interesting about the C-- project of Simon Peyton Jones & Norman Ramsey. But it unfortunately didn't get anywhere near the same backing/momentum as LLVM, and now seems defunct.
Re:Rhine – A Lisp on LLVM by hga on Saturday September 06, 2014 @01:29PM (#8278867)
Indeed, and I found the whole concept to be excellent.

Unfortunately, as far as I can tell, it's defunct outside of its use in the GHC. E.g. the Quick C-- compiler was recently archived here https://github.com/nrnrnr/qc--

Re:Rhine – A Lisp on LLVM by ihnorton on Saturday September 06, 2014 @12:43AM (#8277556)
Julia has some nice functionality for introspecting both lowered and type-inferred ASTs, the corresponding LLVM IR, and finally the resulting assembly code. (several Lisp systems have this kind of thing too)
Re:Rhine – A Lisp on LLVM by StefanKarpinski on Saturday September 06, 2014 @01:01AM (#8277578)
Re:Rhine – A Lisp on LLVM by sgrove on Saturday September 06, 2014 @01:22PM (#8278853)
I believe Haskell compilers are pretty amenable to stuff like this - watching "Data Parallel Haskell", it was interesting to see how they actually map out contiguous memory, etc. https://www.youtube.com/watch?v=NWSZ4c9yqW8

Sadly, it doesn't seem to be as tightly integrated as what you'd see in SBCL from a developers PoV, but I'm certainly intrigued by their ability to achieve some very specific implementation while separating it from the expression of the algorithms.

Re:Rhine – A Lisp on LLVM by jrapdx3 on Sunday September 07, 2014 @02:40AM (#8280481)
You can add Scheme to the list of languages that do this. CHICKEN in particular works by compiling highly expressive Scheme to C, which can be inspected, modified, etc. Also the CHICKEN compiler has a few dozen switches to tweak output, but it's fully open-source (BSD) if that's interesting.

If C is not "low level" enough what are you looking for?

(It occurs to me, the C code can be compiled with clang, which provides further opportunities for low-level output.)