News for hackers. Stuff that matters.
Re:Implementing a JIT Compiled Language with Haskell and LLVM by tmk1108 on Saturday September 12, 2015 @03:53PM (#10209103)
Would you say something like Clojure is also suitable for compiler development or not?
Re:Implementing a JIT Compiled Language with Haskell and LLVM by sklogic on Saturday September 12, 2015 @04:34PM (#10209268)
Yes, it got macros, so you can build something similar to Nanopass framework on top of it easily.
Re:Implementing a JIT Compiled Language with Haskell and LLVM by chrisseaton on Saturday September 12, 2015 @04:07PM (#10209164)
Well any turing complete language is suitable for compiler development work, but yeah Clojure is designed around symbolic computation, recursion and things like that.
Re:Implementing a JIT Compiled Language with Haskell and LLVM by reitzensteinm on Saturday September 12, 2015 @10:07PM (#10210097)
Can we stop pulling out this turing complete quip?

That's like asking on a cooking forum how to open a coconut, and the reply being well any physical object with mass can technically open a coconut with the correct application of force, but yeah, you should probably use a machete.

Re:Implementing a JIT Compiled Language with Haskell and LLVM by pron on Sunday September 13, 2015 @01:36AM (#10210457)
BTW, the guy you replied to is part of the team working on what is probably the most advanced compiler technology breakthrough in the last decade (Truffle/Graal). So he's not "technically right", but has actually contributed to the world's most revolutionary compiler (which is written neither in Haskell nor a Lisp).
Re:Implementing a JIT Compiled Language with Haskell and LLVM by reitzensteinm on Sunday September 13, 2015 @02:55AM (#10210583)
I was replying to what he said, not who he is.
Re:Implementing a JIT Compiled Language with Haskell and LLVM by pron on Sunday September 13, 2015 @03:23AM (#10210619)
I think that's relevant context which proves that your analogy in this particular case is inappropriate. He's a chef working in one of the world's greatest restaurants and he's not using a machete to open the coconut. Therefore, there are probably good reasons to prefer another tool and the advantages of a machete are probably not that big (or are offset by other factors). Again -- in this particular case.

So while the "any Turing complete language" is an over-generalization, so is "use the right tool for the job". Programming languages are not at all like knives or hammers as they are 1/ terribly expensive 2/ require constant training 3/ require specialization and 4/ each designed to be general-purpose. It's more productive to use just one language you know best than keep switching to a completely different one that's marginally better at the particular task at hand.

Re:Implementing a JIT Compiled Language with Haskell and LLVM by chrisseaton on Sunday September 13, 2015 @07:38AM (#10211040)
I was trying to challenge the idea that there is anything magic about compilers. Some people think they do magic things that they could never understand, but the reality all the techniques could be implemented in VB6 if you wanted. You don't need a server, a database driver, middleware or whatever. If your language can read from somewhere and write to somewhere that's all you need. That's what makes compilers perfect little programs in my mind.
Re:Implementing a JIT Compiled Language with Haskell and LLVM by tel on Sunday September 13, 2015 @12:34AM (#10210362)
I'm using this one, thanks!
Re:Implementing a JIT Compiled Language with Haskell and LLVM by sklogic on Sunday September 13, 2015 @05:53AM (#10210830)
Btw., you do not need a Turing-complete language to build a compiler. It is much better to use a non-Turing-complete one, ideally, a total language.