These are chat archives for got-lambda/expression

18th
Jan 2017
Erik Svedäng
@eriksvedang
Jan 18 2017 09:58
yeah, article seems to be about 50% trolling and 50% somewhat reasonable criticism...
Anyone has any experience with the Ocaml or Haskell LLVM bindings..? I've played around with the C and C++ bindings which are both really easy to get up and running. Not so with the Haskell and Ocaml ones, it's just a big mess of dependency problems and linker errors :'(
Magnus Therning
@magthe
Jan 18 2017 12:21
I've played with neither, but I was under the impression that the OCaml ones are good... I'm assuming you are building using all the modern tools
@Jell, @suvash and other docker users: https://www.youtube.com/watch?v=PivpCKEiQOQ
Suvash Thapaliya
@suvash
Jan 18 2017 12:26
Lolkay. Will have to check this.
Marco Zocca
@ocramz
Jan 18 2017 12:46
DevOps Hitler is right tho
Marco Zocca
@ocramz
Jan 18 2017 12:54
and, as I said that, some piece of javascript managed to freeze my laptop, forcing me to reboot. Take that, process isolation
Erik Svedäng
@eriksvedang
Jan 18 2017 13:00
@magthe Yeah, the Ocaml bindings are even included in the official LLVM repo! But still, no cigarr. Doesn't help that there are like 5 different build systems for Ocaml and they are all so bad people keep writing new ones, it seems ^^
Magnus Therning
@magthe
Jan 18 2017 14:16
@eriksvedang, haha, you have my sympathies... that's exactly my experience and the sole reason why I've left OCaml-land and gone back to Haskell, even when OCaml would have a somewhat better fit for a project
I've done that at least 3 times now... first I notice that the OCaml build tools have received some love, so I get my hopes up, then as I try them out I find them still lacking
Erik Svedäng
@eriksvedang
Jan 18 2017 15:08
yeah, sad :/
I just tried some Swift bindings, they work perfectly with no fuzz :O
let module = Module(name: "MainModule")
let builder = IRBuilder(module: module);

let fTy = FunctionType(argTypes: [], returnType: IntType(width: 32))
let f = builder.addFunction("main", type: fTy)
builder.positionAtEnd(of: f.appendBasicBlock(named: "entry"))
builder.buildRet(IntType.int32.constant(0))

module.dump()

try module.emitBitCode(to: "program.bc")
preeetty nice