00:15:02 | * | q66 quit (Quit: Quit) |
02:44:04 | * | fowl quit (Ping timeout: 246 seconds) |
03:35:06 | * | fowl joined #nimrod |
03:41:33 | * | FreeArtMan quit (Read error: Operation timed out) |
05:24:19 | * | FreeArtMan joined #nimrod |
07:27:37 | * | gour joined #nimrod |
09:47:25 | * | gour quit (Disconnected by services) |
09:47:27 | * | gour_ joined #nimrod |
10:04:14 | gour_ | my C skills are a bit rusty and have problem making c2nim happy to even start producing something...anyone can help? |
10:05:50 | gour_ | the original header file is here: http://pastebin.com/CA40cJv6 |
10:05:54 | * | gour_ is now known as gour |
10:10:05 | fowl | gour: what line does it error on |
10:12:27 | gour | fowl: tmp/swe/swephexp.h(470, 37) Error: ';' expected |
10:13:18 | gour | i've tried with #def directive, but it does not help...it was long ago when i was fiddling with C and its declarations |
10:15:24 | fowl | gour: you will probably have to replace all those ext_def(*) calls |
10:15:28 | gour | otoh, being able to provide wrapper for this library, would enable use to quickly test nimrod for possible adoption for our project |
10:16:27 | gour | fowl: replace with what? give me one example that works, editor will do the rest :-) |
10:18:40 | fowl | s/ext_def ?\(([^)])\)/$1/ |
10:20:08 | fowl | does that make sense |
10:21:01 | gour | i'll try in vim |
10:28:21 | * | Trix[a]r_za quit (Ping timeout: 255 seconds) |
10:31:15 | * | Araq_ joined #nimrod |
10:31:48 | * | Araq_ quit (Client Quit) |
10:36:40 | * | Trix[a]r_za joined #nimrod |
10:39:02 | * | mal`` quit (Ping timeout: 245 seconds) |
10:40:22 | * | mal`` joined #nimrod |
11:07:50 | * | Trix[a]r_za is now known as Trixar_za |
11:40:31 | * | _ponce quit (Remote host closed the connection) |
11:58:17 | gour | i simplifed my header file in order to get a feeling what does c2nim do...it can be nice helper.. |
12:28:17 | * | _ponce joined #nimrod |
13:24:54 | * | zahary joined #nimrod |
13:41:04 | * | zahary quit (Quit: Leaving.) |
14:09:14 | * | Trixar_za is now known as Trix[a]r_za |
14:12:14 | * | q66 joined #nimrod |
15:23:05 | gour | i gave up on D2 and decided to use Ada due to larger community, stabler platform, mature language/tools and now considering nimrod...am i dumb or what? |
15:39:40 | * | FreeArtMan quit (Ping timeout: 248 seconds) |
16:10:55 | * | shevy joined #nimrod |
16:11:00 | shevy | baaaaabel! |
16:11:05 | shevy | babelfish! |
16:40:15 | dom96 | hello |
18:38:36 | Zor | Araq: poke |
19:47:06 | * | FreeArtMan joined #nimrod |
20:07:01 | * | Vladar joined #nimrod |
20:14:56 | * | shevy quit (Ping timeout: 244 seconds) |
20:21:47 | * | gradha joined #nimrod |
20:22:57 | * | FreeArtMan quit (Quit: Out of this 3D) |
20:23:07 | * | FreeArtMan joined #nimrod |
20:28:17 | * | shevy joined #nimrod |
20:32:57 | * | Vladar quit (Quit: Ухожу я от вас (xchat 2.4.5 или старше)) |
21:31:02 | * | XAMPP_ quit (Quit: Leaving) |
21:31:27 | * | XAMPP joined #nimrod |
21:35:22 | gradha | dom96: I'm having a conflict for libiconv on mac, which doesn't have a clear solution |
21:35:42 | gradha | the problem is that lib/pure/encodings.nim as it is now fails to work on macosx |
21:36:17 | gradha | after adding the macosx native libiconv.dylb name to the iconvDll variable, running the encodings.nim test works |
21:36:37 | gradha | however, for Aporia you need gtk libraries provided by macports |
21:37:17 | gradha | now, when you export LD_LIBRARY_PATH to make the binary find the macports libraries, the macports libiconv library is linked in |
21:37:37 | gradha | and the libiconv provided by macports seems to require function names to use the lib prefix |
21:38:02 | gradha | so basically the native macosx libiconv exports iconv_open, the macports one exports libiconv_open |
21:38:57 | gradha | and you can't know in advance which would be loaded |
21:39:27 | gradha | a solution would be to set the prefix after loading the library, trying to detect one or the other |
21:40:17 | * | FreeArtMan quit (Ping timeout: 246 seconds) |
21:40:37 | gradha | of always try to load the prefixed version first, and if that failed, import the non prefix version |
21:40:52 | dom96 | gah, that's kinda silly. Why does the macports and native library have the same filename? |
21:41:02 | gradha | they are different too |
21:41:37 | dom96 | hrm? The filenames are different? |
21:42:02 | gradha | yes, the native one is libiconv.dylib |
21:42:22 | gradha | ah, no, wait, the macports one is that too |
21:42:47 | gradha | I have /usr/lib/libiconv.dylib and /opt/local/lib/libiconv.dylib |
21:43:02 | dom96 | it would be an easy fix if the filenames were different. |
21:43:37 | gradha | wouldn't it be possible to run the importc inside a try block? so I can first try with prefix, then without |
21:44:17 | dom96 | I'm not sure it works that way. As far as I know importc will not generate an exception. |
21:44:57 | gradha | yeah, it just says "could not import blah" |
21:45:17 | dom96 | indeed. |
21:45:42 | gradha | hmm... maybe there any other way than import to peek at the availability of a C symbol? |
21:46:37 | dom96 | You can use this: http://build.nimrod-code.org/docs/dynlib.html |
21:46:42 | gradha | I know at the C level you can look at the address of a function and if not null it means it was loaded |
21:46:57 | dom96 | But i'm not sure you can do much with 'importc' |
21:47:17 | dom96 | You might have to do some clever things with templates or macros. |
21:47:27 | gradha | I'll try something |
21:53:37 | dom96 | the 'dynlib' pragma allows you to give it a function, sadly, 'importc' does not. http://build.nimrod-code.org/docs/manual.html#dynlib-pragma-for-import |
21:57:57 | gradha | echo doesn't work inside when blocks? |
21:58:22 | gradha | ah, wait, it does, when importc does not fail |
22:08:02 | gradha | yeah, the use of const with runtime checks seems to be impossible to coerce |
22:10:17 | gradha | this is the closest, but doesn't compile https://gist.github.com/4289124 |
22:11:07 | gradha | I guess this is where the "clever things with templates or macros" comes in |
22:11:57 | dom96 | indeed |
22:12:07 | * | dom96 is working on a prototype |
22:12:22 | dom96 | However, I am actually quite a noob with macros heh |
22:15:42 | gradha | isn't this something impossible? macros/templates work at compile level, but the library checks happen at runtime |
22:18:28 | gradha | it seems it would be easier for mac users who build aporia to define the prefix statically during compilation, presumably when niminst grows bundle support, since the bundle implies a known library |
22:18:33 | dom96 | yes, well you could generate a procedure using a macro which uses dynlib to load it's own implementation. |
22:18:58 | dom96 | My plan to implement this is highly inefficient. |
22:19:03 | dom96 | But sounds fun, and gives me an excuse to use macros. |
22:19:23 | dom96 | perhaps Araq will provide a better 'importc' |
22:20:48 | gradha | for the moment I'll push the normal libiconv for encodings and info about aporia |
22:22:58 | dom96 | allright |
22:23:43 | gradha | hmm... another solution would be to always use a specific prefix, and dynlib a "trampolyne" which during the first call changes the address of the functions |
22:37:38 | * | gour is reading nimrod's tut1 - 2nd pass |
22:42:23 | gradha | I think I'm on an aporia bug spree: https://gist.github.com/4289283 https://gist.github.com/4289291 https://gist.github.com/4289299 https://gist.github.com/4289304 |
22:42:43 | gradha | actually all four instances are meant to be the same behaviour, but somehow produced four different stack traces |
22:43:03 | gradha | what I do is open aporia, it loads aporia.nim (previous file), then right click on a word to jump to definition |
22:44:23 | gradha | BTW, the path to the nimrod binary is found out correctly, but it still prints "sh: idetools: command not found" |
22:44:58 | gradha | which means: see ya tomorrow, the mac is probably getting too hot to do anything useful now |
22:45:03 | * | gradha quit (Quit: gradha) |
22:57:03 | dom96 | hrm, weird. |
22:59:58 | * | dom96 wonders where Araq is |
23:27:23 | * | gour quit (Quit: WeeChat 0.3.8) |
23:46:38 | Araq | pong Zor |
23:46:48 | Araq | dom96: I'm here :P |
23:47:08 | dom96 | Araq: You're late. |
23:47:18 | * | dom96 is disappointed |
23:47:23 | dom96 | :P |
23:47:38 | Araq | and ... you don't need a macro to accomplish 'dynlib' weirdness; you can use the new stuff I implemented for the opengl wrapper |
23:47:43 | dom96 | read logs |
23:47:48 | Araq | it's pretty easy :P |
23:47:53 | dom96 | oh? |
23:47:58 | Araq | no need for fancy macros |
23:48:38 | dom96 | link? |
23:49:18 | dom96 | hrm, I think I see it |
23:49:43 | dom96 | https://github.com/Araq/Nimrod/blob/master/lib/wrappers/opengl/opengl.nim#L43-L86 |
23:49:48 | dom96 | Right? |
23:50:43 | dom96 | it's too late at night for me to understand how it works :P |
23:52:58 | Araq | right; gradha isn't here anyway |
23:53:28 | dom96 | Well, I guess he'll read logs |
23:55:28 | Araq | well I'm too tired to program it now |
23:56:03 | Araq | and it's easier to program it than to explain it |
23:56:18 | dom96 | So anyway. Ludum dare is starting in like 2 hours. |
23:56:23 | * | dom96 shall attempt to compete with Nimrod :) |