@bascule Ah I wondered why RbNaCl was hardcoding instead of using the constants from libsodium.
Anyone know if there's a good way to extract constants from C code for Ruby FFI extensions? https://github.com/cryptosphere/rbnacl/issues/49 …
-
-
-
@dstufft it's an FFI extension and therefore has no access to the preprocessor -
@bascule CFFI does it and is the only FFI I ever used tbh :) -
@dstufft apparently Ruby FFI can too... looking into it: http://rubydoc.info/github/ffi/ffi/FFI/ConstGenerator …
End of conversation
New conversation -
-
-
@bascule we do it in our build process: https://github.com/rubinius/rubinius/blob/master/rakelib/platform.rake … -
@brixen is that like this, and is it using GCC-XML? I'm confused: http://rubydoc.info/github/ffi/ffi/FFI/ConstGenerator … -
@bascule what you linked to was derived from Rubinius FFI. It is more autoconf really than gcc-xml. It compiles C programs and extracts data - End of conversation
New conversation -
-
-
@bascule look for c2ffi and c2ffi-ruby in github -
@luislavena cool, thanks
End of conversation
New conversation -
-
-
@bascule http://www.gccxml.org/HTML/Running.html … ? oh you said good -
@jrecursive yeah, o_O
End of conversation
New conversation -
-
-
- End of conversation
New conversation -
-
-
@bascule yes, just use a C compiler parse the header files and extract the constants. :trollface: -
@tenderlove@bascule GENIUS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
@raggi@tenderlove will there be XML involved? Because I <3 XML
End of conversation
New conversation -
-
-
@bascule use Haskells ffi? I kid I kid. Parsing is hard or something. Gl sorting that out.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.