News for hackers. Stuff that matters.
Re:DragonFFI: C Foreign Function Interface and JIT Using Cla... by danielvf on Friday February 02, 2018 @12:58PM (#16292561)
I do some embedded hardware work, and have tests for the C code in python vi FFI. It's also amazing to be able to graph out scenarios with inputs and outputs in Jupiter notebook.

But I hate, hate, hate, cffi's parsing of include files. Makes my life miserable every time I make a change there.

I'm really hoping DragonFFI takes off.

Re:DragonFFI: C Foreign Function Interface and JIT Using Cla... by eslaught on Friday February 02, 2018 @01:45PM (#16293057)
This is one of my favorite features of Terra [1]. It also uses Clang to parse the header files, so most things "Just Work" (including, even, JITing inline functions on the fly so they can be used).

[1]: http://terralang.org/api.html#using-c-inside-terra

Re:DragonFFI: C Foreign Function Interface and JIT Using Cla... by haberman on Friday February 02, 2018 @03:12PM (#16293830)
Out of curiosity, what do you use Terra for? It looks cool but I haven't found an excuse to use it.
Re:DragonFFI: C Foreign Function Interface and JIT Using Cla... by eslaught on Friday February 02, 2018 @03:43PM (#16294046)
I used it to build Regent: http://regent-lang.org/ (TL;DR: Implicit parallelism on supercomputers with automatic compilation for GPUs, etc.)
Re:DragonFFI: C Foreign Function Interface and JIT Using Cla... by bliker on Friday February 02, 2018 @01:03PM (#16292606)
I've been using ctypes for the exact same purposes and it has been pretty painless. Why have you decided to use FFI?
Re:DragonFFI: C Foreign Function Interface and JIT Using Cla... by danielvf on Friday February 02, 2018 @01:20PM (#16292791)
As far as I can see, ctypes requires you to manually specify everything, rather than load it from the .h include file. This is even more work.
Re:DragonFFI: C Foreign Function Interface and JIT Using Cla... by chatmasta on Friday February 02, 2018 @01:53PM (#16293139)
Not to mention another source for error when testing the c code in python. Your test might fail because you forgot to update a header definition in the python, not because you introduced an error in the C code.