I read that tinyScheme can call libraries (.dll) without special bindings or other set-up for each library function you call.
Can any of the other script languages that get metioned here, like OCaml, do that?
>>1
I'm not entirely sure of what are you talking about, but there are ways to load arbitrary DLLs and call their functions from most popular languages.
>>3
he obviously means without a bunch of extra crap.
which would mean you can do it in one line.
except in java, where that would mean you could do it in less than 1000 lines.
Yeah, Python 2.5 can do that. I found it pretty amusing when Ruby and (pre-ctypes) Python advocates made a big deal out of the ease of interoperability with C code and showed how, with mere 50 lines of wrapper code per function, you can do what is already provided for you with any language with a decent FFI.
At least SWIG takes most of the fail out of working with those languages, even though it is a solution for a problem that shouldn't exist in the first place.
Name:
Anonymous2007-06-05 21:00 ID:TP625B1a
libffi from gcc or cygwin seems to be the base on which ctypes, tinyScheme, and others build their wrapper-less FFI. Google shows various experiments with libffi in Ruby, Haskell, etc., but I'm still looking for a list of script languages that formally include libffi.
>>7
PROTIP: The word `script language' doesn't mean anything. It's a non-word created by clueless C++ fucktards to dismiss any language that would save 90% from the time they spend on micromanaging their trivial programs.
Which of these 2 topics will help you write programs?
1. Defining "script language" very specifically.
2. Knowing which interpreters and bytecode compilers can
call .dll functions without making you write wrapper code.
Name:
Anonymous2007-06-06 8:09 ID:4wrgVT2e
PROTIP: The word `script language' does mean something. It's a word created by clueless C++ fucktards who are too lazy to create well-defined words because they have to deal with well defined things so often.
It's the same as ctypes, except ctypes lets you rape the stack by making up a prototype at runtime if you don't give it one.
Name:
Anonymous2007-06-06 17:54 ID:89SPhOJW
ctypes can only `do' stdcall and cdecl calls, so if your c function expects arguments in other format, like Microsoft's fastcall (first two args in ecx and edx, rest on stack), then there is no way to communicate that information to ctypes.
Plus don't expect to use ctypes for performance critical code, like opengl rendering, or what have you.
Name:
Anonymous2007-06-06 19:50 ID:VRtMp4KF
Protip: Never use the *A Win32 calls. Use the *W ones, or GTFO. Only stupid Japanese hentai game programmers use *A now.
>>15
A declaration is OK. Mainly we're trying to get away from using the C compiler for wrappers. You want to do ALL your work inside the script language.
>>17
Thanks for the warning. Now I need to find my notes on identifying the .dll function's type of call using the nm command. All I can remember now is that some of the symbols have numbers after them indicating the byte length of the parameter.
Name:
Anonymous2007-06-07 7:27 ID:Ra8euJam
If I were the lead Windows architect, (after dropping Vista and going back to Windows 2000 with some XP stuff) the next version of Windows would map all *A 8-shits functions to something like KillProcess(GetCurrentProcess(), KPFL_WITH_FIRE).
>>21
Even better, if we're rewriting the development history of Windows, scrap 9x altogether; it was a bad idea and got worse as time went on. (LOL ACTIVEX)
Instead, abandon the "user" products altogether after Win3.1, migrate *everybody* to Windows for Workgroups, and adopt WinNT as the sole platform to develop. Also don't call it something gay like Windows 2000. Use real version numbers like Windows NT 5.0.
>>22
Nice job staying on point, Goober. You probably didn't even think of starting a separate Unicode thread. Thanks for tossing more crap on the pile that is /prog/.