<<14-12-2012>>

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:14gour_my C skills are a bit rusty and have problem making c2nim happy to even start producing something...anyone can help?
10:05:50gour_the original header file is here: http://pastebin.com/CA40cJv6
10:05:54*gour_ is now known as gour
10:10:05fowlgour: what line does it error on
10:12:27gourfowl: tmp/swe/swephexp.h(470, 37) Error: ';' expected
10:13:18gouri'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:24fowlgour: you will probably have to replace all those ext_def(*) calls
10:15:28gourotoh, being able to provide wrapper for this library, would enable use to quickly test nimrod for possible adoption for our project
10:16:27gourfowl: replace with what? give me one example that works, editor will do the rest :-)
10:18:40fowls/ext_def ?\(([^)])\)/$1/
10:20:08fowldoes that make sense
10:21:01gouri'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:17gouri 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:05gouri 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:00shevybaaaaabel!
16:11:05shevybabelfish!
16:40:15dom96hello
18:38:36ZorAraq: 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:22gradhadom96: I'm having a conflict for libiconv on mac, which doesn't have a clear solution
21:35:42gradhathe problem is that lib/pure/encodings.nim as it is now fails to work on macosx
21:36:17gradhaafter adding the macosx native libiconv.dylb name to the iconvDll variable, running the encodings.nim test works
21:36:37gradhahowever, for Aporia you need gtk libraries provided by macports
21:37:17gradhanow, when you export LD_LIBRARY_PATH to make the binary find the macports libraries, the macports libiconv library is linked in
21:37:37gradhaand the libiconv provided by macports seems to require function names to use the lib prefix
21:38:02gradhaso basically the native macosx libiconv exports iconv_open, the macports one exports libiconv_open
21:38:57gradhaand you can't know in advance which would be loaded
21:39:27gradhaa 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:37gradhaof always try to load the prefixed version first, and if that failed, import the non prefix version
21:40:52dom96gah, that's kinda silly. Why does the macports and native library have the same filename?
21:41:02gradhathey are different too
21:41:37dom96hrm? The filenames are different?
21:42:02gradhayes, the native one is libiconv.dylib
21:42:22gradhaah, no, wait, the macports one is that too
21:42:47gradhaI have /usr/lib/libiconv.dylib and /opt/local/lib/libiconv.dylib
21:43:02dom96it would be an easy fix if the filenames were different.
21:43:37gradhawouldn't it be possible to run the importc inside a try block? so I can first try with prefix, then without
21:44:17dom96I'm not sure it works that way. As far as I know importc will not generate an exception.
21:44:57gradhayeah, it just says "could not import blah"
21:45:17dom96indeed.
21:45:42gradhahmm... maybe there any other way than import to peek at the availability of a C symbol?
21:46:37dom96You can use this: http://build.nimrod-code.org/docs/dynlib.html
21:46:42gradhaI 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:57dom96But i'm not sure you can do much with 'importc'
21:47:17dom96You might have to do some clever things with templates or macros.
21:47:27gradhaI'll try something
21:53:37dom96the '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:57gradhaecho doesn't work inside when blocks?
21:58:22gradhaah, wait, it does, when importc does not fail
22:08:02gradhayeah, the use of const with runtime checks seems to be impossible to coerce
22:10:17gradhathis is the closest, but doesn't compile https://gist.github.com/4289124
22:11:07gradhaI guess this is where the "clever things with templates or macros" comes in
22:11:57dom96indeed
22:12:07*dom96 is working on a prototype
22:12:22dom96However, I am actually quite a noob with macros heh
22:15:42gradhaisn't this something impossible? macros/templates work at compile level, but the library checks happen at runtime
22:18:28gradhait 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:33dom96yes, well you could generate a procedure using a macro which uses dynlib to load it's own implementation.
22:18:58dom96My plan to implement this is highly inefficient.
22:19:03dom96But sounds fun, and gives me an excuse to use macros.
22:19:23dom96perhaps Araq will provide a better 'importc'
22:20:48gradhafor the moment I'll push the normal libiconv for encodings and info about aporia
22:22:58dom96allright
22:23:43gradhahmm... 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:23gradhaI 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:43gradhaactually all four instances are meant to be the same behaviour, but somehow produced four different stack traces
22:43:03gradhawhat I do is open aporia, it loads aporia.nim (previous file), then right click on a word to jump to definition
22:44:23gradhaBTW, the path to the nimrod binary is found out correctly, but it still prints "sh: idetools: command not found"
22:44:58gradhawhich 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:03dom96hrm, weird.
22:59:58*dom96 wonders where Araq is
23:27:23*gour quit (Quit: WeeChat 0.3.8)
23:46:38Araqpong Zor
23:46:48Araqdom96: I'm here :P
23:47:08dom96Araq: You're late.
23:47:18*dom96 is disappointed
23:47:23dom96:P
23:47:38Araqand ... you don't need a macro to accomplish 'dynlib' weirdness; you can use the new stuff I implemented for the opengl wrapper
23:47:43dom96read logs
23:47:48Araqit's pretty easy :P
23:47:53dom96oh?
23:47:58Araqno need for fancy macros
23:48:38dom96link?
23:49:18dom96hrm, I think I see it
23:49:43dom96https://github.com/Araq/Nimrod/blob/master/lib/wrappers/opengl/opengl.nim#L43-L86
23:49:48dom96Right?
23:50:43dom96it's too late at night for me to understand how it works :P
23:52:58Araqright; gradha isn't here anyway
23:53:28dom96Well, I guess he'll read logs
23:55:28Araqwell I'm too tired to program it now
23:56:03Araqand it's easier to program it than to explain it
23:56:18dom96So anyway. Ludum dare is starting in like 2 hours.
23:56:23*dom96 shall attempt to compete with Nimrod :)