Re: luajit-ffi

2012-05-02 Thread James Miller
Just pitching in as somebody that has worked on a few C bindings, some small some big (current one is XCB, which has the lovely xproto.h file coming to over 15000 lines). Doing automatic conversion of C headers, properly, is difficult, if not impossible. There are all sorts of gotchas and stran

Re: luajit-ffi

2012-05-02 Thread David Nadlinger
On Wednesday, 2 May 2012 at 20:04:30 UTC, so wrote: I keep hearing voices along the lines "NNTP error: 400 loadav [innwatch:load] 2084 gt 1500". yet i... must... click "Send"! I might suffer from the same type of schizophrenia ;) David

Re: luajit-ffi

2012-05-02 Thread David Nadlinger
On Wednesday, 2 May 2012 at 17:52:07 UTC, so wrote: So enum, alias has nothing to do with #define? Or D requires syntax to support the things i mentioned? #define can be used for manifest constants and aliases, yes, but also for many other things, as in the examples from popular libraries that

Re: luajit-ffi

2012-05-02 Thread David Gileadi
On 5/2/12 1:04 PM, so wrote: Sorry everyone! I can't restrain the urge to answer such posts. I feel the presence of some higher powers, yes! they are trying to tell me... something, perhaps warning me in a way? I keep hearing voices along the lines "NNTP error: 400 loadav [innwatch:load] 2084 gt

Re: luajit-ffi

2012-05-02 Thread so
On Wednesday, 2 May 2012 at 18:27:18 UTC, agitator wrote: good bye you won't be missed I am just trying to find a better tool to ease the work i do, not trying to be one as yourself. So as long as D rocks, i ll be following. Just not post on forums as it won't do much good when you have hard

Re: luajit-ffi

2012-05-02 Thread agitator
good bye you won't be missed

Re: luajit-ffi

2012-05-02 Thread so
On Wednesday, 2 May 2012 at 16:23:28 UTC, David Nadlinger wrote: Well, after more or less telling Alex that he has no clue what he's talking about, With no reason, right? Could you go back and read why i did what you said i did? I might sometimes sound rude. You can blame my temper, nature o

Re: luajit-ffi

2012-05-02 Thread David Nadlinger
On Wednesday, 2 May 2012 at 12:36:03 UTC, so wrote: Why don't you give a link to the source where they use preprocessor heavily? Like many other C libraries, OpenSSL implements quite a few functions in terms of macros for performance reasons, so that they can be inlined (like [1]). Additional

Re: luajit-ffi

2012-05-02 Thread so
On Wednesday, 2 May 2012 at 11:56:51 UTC, David Nadlinger wrote: On Tuesday, 1 May 2012 at 16:15:58 UTC, so wrote: Have you ever used a C api, say OpenGL? What are they using preprocessor for? other than enum and alias? It is that damn simple. I am not talking about supporting Boost level prep

Re: luajit-ffi

2012-05-02 Thread David Nadlinger
On Tuesday, 1 May 2012 at 16:15:58 UTC, so wrote: Have you ever used a C api, say OpenGL? What are they using preprocessor for? other than enum and alias? It is that damn simple. I am not talking about supporting Boost level preprocessor exploit. I am talking about mature "C" libraries. Oh _c

Re: luajit-ffi

2012-05-01 Thread so
On Tuesday, 1 May 2012 at 16:56:48 UTC, Alex Rønne Petersen wrote: Yes, creating manual bindings is tedious and annoying to maintain, but it is the most foolproof approach. In another language there may not be other exit but D, i am not sure. As it happens, you are safe with D even if you

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 18:56, so wrote: On Tuesday, 1 May 2012 at 16:46:32 UTC, Alex Rønne Petersen wrote: On 01-05-2012 18:15, so wrote: On Tuesday, 1 May 2012 at 15:56:32 UTC, Alex Rønne Petersen wrote: What are you talking about? The link you posted clearly shows that LuaJIT has a C parser built in

Re: luajit-ffi

2012-05-01 Thread so
On Tuesday, 1 May 2012 at 16:46:32 UTC, Alex Rønne Petersen wrote: On 01-05-2012 18:15, so wrote: On Tuesday, 1 May 2012 at 15:56:32 UTC, Alex Rønne Petersen wrote: What are you talking about? The link you posted clearly shows that LuaJIT has a C parser built in. It has everything to do with

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
owledge about the C compiler intended to compile the C library (or the parameters passed to it) than LuaJIT does. If you check some lua bindings, libraries tries to simplify the process, all the duplicate stuff they do on tons of different projects. All for nothing, and i am sure this is true for m

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 18:32, Alex Rønne Petersen wrote: On 01-05-2012 18:22, so wrote: On Tuesday, 1 May 2012 at 15:56:32 UTC, Alex Rønne Petersen wrote: note that FFI is not anything spectacular or innovative; Have you ever written bindings for any of these scripting languages? No, but you're

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 18:15, so wrote: On Tuesday, 1 May 2012 at 15:56:32 UTC, Alex Rønne Petersen wrote: What are you talking about? The link you posted clearly shows that LuaJIT has a C parser built in. It has everything to do with syntax (note that FFI is not anything spectacular or innovative; see

Re: luajit-ffi

2012-05-01 Thread so
e to do it in D. If you check some lua bindings, libraries tries to simplify the process, all the duplicate stuff they do on tons of different projects. All for nothing, and i am sure this is true for many other languages. And then you see luajit-ffi, gives both performance boost and s much

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 18:22, so wrote: On Tuesday, 1 May 2012 at 15:56:32 UTC, Alex Rønne Petersen wrote: note that FFI is not anything spectacular or innovative; Have you ever written bindings for any of these scripting languages? No, but you're missing my point entirely. The concept of FFI is

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 18:08, so wrote: On Tuesday, 1 May 2012 at 15:53:37 UTC, Alex Rønne Petersen wrote: On 01-05-2012 17:43, so wrote: On Tuesday, 1 May 2012 at 15:31:05 UTC, Robert Clipsham wrote: On 01/05/2012 16:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awes

Re: luajit-ffi

2012-05-01 Thread so
On Tuesday, 1 May 2012 at 15:56:32 UTC, Alex Rønne Petersen wrote: note that FFI is not anything spectacular or innovative; Have you ever written bindings for any of these scripting languages?

Re: luajit-ffi

2012-05-01 Thread so
On Tuesday, 1 May 2012 at 15:56:32 UTC, Alex Rønne Petersen wrote: What are you talking about? The link you posted clearly shows that LuaJIT has a C parser built in. It has everything to do with syntax (note that FFI is not anything spectacular or innovative; see libffi, Mono, Lisp, ...). And

Re: luajit-ffi

2012-05-01 Thread so
On Tuesday, 1 May 2012 at 15:53:37 UTC, Alex Rønne Petersen wrote: On 01-05-2012 17:43, so wrote: On Tuesday, 1 May 2012 at 15:31:05 UTC, Robert Clipsham wrote: On 01/05/2012 16:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 17:50, so wrote: On Tuesday, 1 May 2012 at 15:32:40 UTC, Alex Rønne Petersen wrote: On 01-05-2012 17:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic l

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 17:43, so wrote: On Tuesday, 1 May 2012 at 15:31:05 UTC, Robert Clipsham wrote: On 01/05/2012 16:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic langu

Re: luajit-ffi

2012-05-01 Thread so
On Tuesday, 1 May 2012 at 15:32:40 UTC, Alex Rønne Petersen wrote: On 01-05-2012 17:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic language, why on earth D still n

Re: luajit-ffi

2012-05-01 Thread so
On Tuesday, 1 May 2012 at 15:31:05 UTC, Robert Clipsham wrote: On 01/05/2012 16:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic language, why on earth D still need

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 17:31, Robert Clipsham wrote: On 01/05/2012 16:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic language, why on earth D still need manual C bindings wh

Re: luajit-ffi

2012-05-01 Thread Robert Clipsham
On 01/05/2012 16:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic language, why on earth D still need manual C bindings while having ABI compatibility? So luajit comes

Re: luajit-ffi

2012-05-01 Thread Alex Rønne Petersen
On 01-05-2012 17:24, so wrote: http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic language, why on earth D still need manual C bindings while having ABI compatibility? So luajit comes

luajit-ffi

2012-05-01 Thread so
http://luajit.org/ext_ffi.html https://github.com/malkia/ufo How awesome is Mike Pall? I didn't dive into details of the code, but if he can do this with a dynamic language, why on earth D still need manual C bindings while having ABI compatibility? So luajit comes with a C compiler?