Ruby/DLX FAQ (Frequently Asked Questions)
General Questions
void usleep(unsigned long usec);
Ruby/DL might suffice, but when you really want to use any shared library that is coming your way in a simple and quick fashion, you'll soon learn the limitations of Ruby/DL.
To put it simply: using lots of —possibly nested— data types, that are passed to or returned from functions, that may have many fields that you might want to access, callback functions etc.. etc.. is not going to be fun in Ruby/DL. It's just not well enough equipped for that job, but Ruby/DLX is! For an extensive comparison click hereTo quote Eben Moglen, counsel for the FSF, himself:
Another important area is trusted computing, "which means computers you cannot trust," Moglen said, adding that if the FSF uses its leverage correctly, it could affect what kinds of trust are recognized in the network.
But if we don't use our leverage correctly, we could wind up in a world where free software is injured very badly, where you can modify code but you cannot do anything with that modified code because the hardware will not run that code because it cannot be signed 'Microsoft or IBM,'
If that happens, free software will be excluded from hardware, and that is not an outcome we can tolerate.eweek, November 2004
Warnings & Errors
Fatal DLX error: definition of struct FooBar is using an incomplete type: Baz (./mylib/mysource.rb:11)
but I definately have a typealias that should handle this type:
typealias( "Baz*", "void*" );
dlx/DLXImport.rb:250:in `call': no implicit conversion from nil to integer (TypeError)
If you really have the address of a pointer and want to pass it to the function you should consider wrapping it inside a DLXCPtr (
DLXCPtr.wrap( addr )), however, if all you wanted to pass is a 0, then pass the function a nil instead.