<< 06-06-2013 >>

00:07:41fowlAraq, im changing the lua wrappers to use cint instead of int everywhere then im going to see how much work it will be to get 5.2 in there
00:07:48fowlthere are a lot of api changes in 5.2 iirc
00:10:37*zahary___ joined #nimrod
00:11:18*Boscop quit (Disconnected by services)
00:11:21*Boscop joined #nimrod
00:13:41*zahary__ quit (Ping timeout: 246 seconds)
00:22:15*phoquer quit (Ping timeout: 256 seconds)
00:53:13*ARCADIVS quit (Ping timeout: 276 seconds)
00:59:24*DAddYE quit (Remote host closed the connection)
02:02:29*DAddYE joined #nimrod
02:07:01*DAddYE quit (Ping timeout: 248 seconds)
02:09:41*DAddYE joined #nimrod
02:13:57*DAddYE quit (Ping timeout: 248 seconds)
02:36:54*DAddYE joined #nimrod
02:46:17OrionPKthere's a typo on the homepage (Cario instead of Cairo)
02:47:32*XAMPP__ left #nimrod ("My code has no bugs, just random features")
02:50:27*XAMPP joined #nimrod
02:50:27*XAMPP quit (Changing host)
02:50:27*XAMPP joined #nimrod
02:52:14*SirSkidmore is now known as SirSkids|Zzz
04:00:16*DAddYE quit (Remote host closed the connection)
04:23:09*OrionPK quit (Quit: Leaving)
04:23:10*DAddYE joined #nimrod
05:04:34*DAddYE quit (Remote host closed the connection)
05:22:01*q66 joined #nimrod
05:54:04*DAddYE joined #nimrod
07:10:30*Araq_ joined #nimrod
07:23:25fowlError: invalid pragma: importc: "lua_$1"
07:23:29fowlwut -_-
07:27:52fowlthis works in lauxlib.nim but not in lua.nim
07:27:57fowl{.push importc: "luaL_$1".}
07:40:54*Araq_ quit (Read error: Connection timed out)
07:41:46*Araq_ joined #nimrod
07:55:17*DAddYE quit (Remote host closed the connection)
08:23:37*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931])
08:55:36*DAddYE joined #nimrod
09:00:11*DAddYE quit (Ping timeout: 256 seconds)
09:05:45*DAddYE joined #nimrod
09:10:23*DAddYE quit (Ping timeout: 256 seconds)
10:06:30*DAddYE joined #nimrod
10:11:01*DAddYE quit (Ping timeout: 256 seconds)
10:36:53*Araq_ joined #nimrod
10:41:11*Araq_ quit (Client Quit)
11:07:17*DAddYE joined #nimrod
11:11:40*DAddYE quit (Ping timeout: 246 seconds)
11:29:42*SirSkids|Zzz is now known as SirSkidmore
11:44:57*Trix[a]r_za is now known as Trixar_za
11:50:25*agussp joined #nimrod
11:51:06*agussp quit (Client Quit)
11:58:43*Trixar_za is now known as Trix[a]r_za
12:07:54*DAddYE joined #nimrod
12:12:23*DAddYE quit (Ping timeout: 240 seconds)
12:33:21_poncehow do I get command line arguments?
12:36:46tangentstormparamstr
12:36:54tangentstormparamstr(1) is the first, etc.
12:37:07tangentstormparamcount is the count.
12:37:22tangentstorm_ponce: ^
12:38:32_poncethanks
12:39:16*zahary___ left #nimrod (#nimrod)
12:39:30*zahary___ joined #nimrod
12:56:53*Araq_ joined #nimrod
12:59:21*Araq_ quit (Client Quit)
13:08:46*DAddYE joined #nimrod
13:09:10*Trixar_zb joined #nimrod
13:10:22*Trix[a]r_za quit (Ping timeout: 264 seconds)
13:10:47*tangentstorm quit (Ping timeout: 264 seconds)
13:11:39*tangentstorm joined #nimrod
13:13:16*DAddYE quit (Ping timeout: 245 seconds)
13:15:24*Zor_ joined #nimrod
13:18:09*SirSkidmore quit (Ping timeout: 279 seconds)
13:18:33*SirSkidmore joined #nimrod
13:18:50*Zor quit (Write error: Broken pipe)
13:19:21*Zor_ is now known as Zor
13:21:16*Trixar_zb is now known as Trixar_za
13:32:51*Trixar_za is now known as Trix[a]r_za
13:40:57*greyfox1 quit (Ping timeout: 246 seconds)
13:41:17*greyfox joined #nimrod
13:41:39*greyfox is now known as Guest8055
14:22:46*Endy joined #nimrod
15:02:30*[1]Endy joined #nimrod
15:06:40*Endy quit (Ping timeout: 276 seconds)
15:06:40*[1]Endy is now known as Endy
15:10:05*DAddYE joined #nimrod
15:14:43*DAddYE quit (Ping timeout: 260 seconds)
16:07:11*Endy quit (Read error: Connection reset by peer)
16:22:39*DAddYE joined #nimrod
16:23:03*[1]Endy joined #nimrod
16:26:14*[1]Endy is now known as Endy
17:18:33*gradha joined #nimrod
17:27:14*Guest8055 left #nimrod (#nimrod)
17:28:03Araqgradha: still waiting for your readline patch ;-)
17:29:13gradhaI'll first send you some idetools tests, maybe today if I manage to not watch too much youtube
17:30:02gradhaI was hoping to use idetools output as a basis for the hyperlinking toc but I see it also generates pragma information
17:30:24Araqwhat?
17:30:39Araqwhat's "pragma information" and why is it bad?
17:30:47gradhasystem.& generates proc (string, string): string{.noSideEffect.}
17:31:03gradhanot that it's bad, since it's easy to strip
17:31:15gradhabut it makes me wonder if that should be part of the signature or some extra column
17:31:53AraqnoSideEffect, tags, raises, immediate are part of the signature, the others are debatable I think
17:32:41gradhathas that mean you could have two procs which only differentiate themselves by the pragma?
17:35:57gradhaI understand signature as "calling signature", for me pragmas/effects are not part of that, because that won't be visible at the C calling level
17:36:46gradhaalso the return value would fall off for that constrained definition of signature
17:37:08DAddYEHi Araq! First congrats for this exceptional project
17:38:27DAddYEI'm not a well experienced c programmer, I come from ruby-land and clojure-land
17:38:40DAddYEso I'm wondering if u plan to improve c2nim
17:39:13gradhaIIRC the official position is "patches are welcome", especially if they improve C++ parsing
17:39:30gradhawhat do you want to use c2nim for?
17:40:09DAddYEgradha: right now to parse https://github.com/edenhill/librdkafka/blob/master/rdkafka.h
17:40:21DAddYEusr/src/extras/librdkafka/rdkafka.h(91, 7) Error: identifier expected, but found '#'
17:41:10gradhahmm... maybe the problem is the define happening in the middle of the struct, could you try moving that before the typedef?
17:41:16Araqmove those #defines out of the struct decls
17:41:49DAddYEI did
17:41:51DAddYEno luck
17:42:35DAddYEit stops usr/src/extras/librdkafka/rdkafka.h(108, 9) Error: identifier expected, but found '{'
17:42:52gradhamaybe the nested struct?
17:42:55Araqwell the nested struct declarations are evil too ;-)
17:42:58DAddYEgradha: yes
17:43:09Araqok, gradha continues :-)
17:43:14DAddYEit stop struct {
17:43:34gradhayou could try unnesting the struct and typedefing it, then using it like that inside the other
17:43:50DAddYEgradha: oki thanks
17:43:58DAddYEanother little question
17:44:47DAddYEdo you have plans for some like goroutines and go channels?
17:45:38gradhagoroutines aka continuations? see if http://forum.nimrod-code.org/t/155 answers
17:45:59gradhathere are threads and you can use channels between them, but compared to continuations they are heavy
17:47:50dom96if nobody else picks it up, I will resume work on continuations in about a month.
17:48:53DAddYEok thanks, makes sense
17:50:25Araqbut continuations are different from goroutines
17:50:44Araqand nimrod's first class iterators are no continuations either ;-)
17:51:05NimBotnimrod-code/babel master 7ab81d5 Billingsly Wetherfordshire [+0 ±1 -0]: Update babel.nim... 2 more lines
17:51:05NimBotnimrod-code/babel master 8016ef9 Dominik Picheta [+0 ±1 -0]: Merge pull request #6 from fowlmouth/patch-3... 2 more lines
17:51:16AraqDAddYE: there is a new concurrency system in the works which ensures race and deadlock freedom at compile time
17:52:19DAddYEAraq: that's is a super good news
17:52:40DAddYEconcurrency, forking and so on today are a must have :D
17:52:54Araqwell it won't be as cheesy as Go's concurrency model ;-)
17:53:08Araqbut then Go ensures nothing whatsoever at compile time ...
17:53:34dom96Araq: Aren't goroutines basically C#'s await?
17:53:53Araqdom96: no they are not, they "capture the stack"
17:56:43tangentstormAraq: are you familiar with SuperPascal?
17:56:47DAddYEAraq: is there a workaround for commas in macros: TAILQ_HEAD(, rd_kafka_op_s)?
17:57:13tangentstormhttp://en.wikipedia.org/wiki/SuperPascal
17:59:34Araqtangentstorm: no, but I studied occam
18:00:21tangentstormI haven't worked much with it, but IIRC it made similar claims about compile-time guarantees.
18:00:31tangentstormsource is here: https://github.com/tangentstorm/pascal/tree/master/super
18:00:52tangentstormalso here: http://brinch-hansen.net/
18:01:31tangentstormhere we go. interference control in super pascal: http://brinch-hansen.net/papers/1994d.pdf
18:02:14tangentstormHaven't read that one yet, but he was a pretty solid writer.
18:12:04AraqparallelPascal omits procedural parameters and pointers, so no thanks ;-)
18:13:07tangentstorm:) Wasn't advocating for it or anything, just thought you might find it interesting.
18:30:28DAddYEAraq: is there a workaround for c2nim for commas in macros: TAILQ_HEAD(, rd_kafka_op_s)?
18:32:09gradhathat macro seems to be a wrapper for a type, depending on the macro you may want to unwrap it completely
18:35:43DAddYEgradha: thx
18:35:44gradhayou could see where that macro is defined or run the file through the preprocessor to see what would be the final type for that struct's field
18:36:55gradhasee what "cpp header.h|less" gives out
18:38:16gradha_ponce: perhaps instead of playing with the commandline arguments manually you would like to use the awesome https://github.com/gradha/argument_parser ?
18:39:08gradhaoooh man, I have to hyperlink its examples for the web
18:41:12fowlgradha, can you write an android app using only the ndk/jni
18:41:59gradhaup to 2.1 it was only possible to invoke through jni, but since 2.1 they provide hooks to mimic the full activity lifecycle, so in theory yes
18:42:15gradhaafter all, that's what presumably the marmalade sdk guys are doing with their C++ framework
18:43:48gradhaok, that should have been 2.3, search for NativeActivity at https://developer.android.com/tools/sdk/ndk/index.html
18:50:00fowllooks like a hassle
18:58:50*DAddYE_ joined #nimrod
18:58:50*DAddYE quit (Read error: Connection reset by peer)
19:30:34*Endy quit (Ping timeout: 276 seconds)
19:37:01gradhaAraq: default parameters aren't included in idetools for skProc, what do you think about them?
19:37:26Araqthey should be included
19:38:40AraqDAddYE_: you may have to transform #define X(....) .... into #def X(...) ...
19:39:04Araqbut I never tested an empty argument with the #def replace mechanism so I don't know if it works
19:40:12AraqI wonder if there is a single C header file out there that uses no obsure C feature ...
19:48:22apotheonI'm sure there are several.
19:48:53apotheonHalf a dozen, at least.
19:49:09Araqnever encountered any except lua.h perhaps
19:50:50Araqbut hey, C is simple to wrap ... you only have to adhere to some easy rules like: no excessive preprocessor, no bit fields, no unions, global variables can also cause problems, ...
19:51:24Araqeffectively using only some subset of C for the interface
19:51:25fowlAraq, lua 5.2 will require a separate define or a separate module alltogether
19:51:46Araqwhich is exactly C++'s solution, but C++ is bad mmkay?
19:52:30Araqfowl: I think you should make a lua52.nim module
19:52:57fowlgood me too
19:53:24Araqand include the funny lauxlib and lualib stuff in the same module too
19:53:46Araqnobody cares about that split anyway
19:54:16fowlits dumb that they're split up anyways, they all use the same dynlib
19:54:28Araqthat's what I mean, yes
19:55:12fowlhow do you reference an issue from a commit? do you just include #issuenumber in the description?
19:55:20Araqyep
19:57:38Araqany idea what to do about:
19:57:40Araqcompiler/nimcache/sockets.cpp:699:42: error: invalid conversion from ‘const char*’ to ‘NCSTRING {aka char*}’ [-fpermissive]
19:57:54Araqthat keeps nimrod from bootstrapping in C++ mode
19:58:09Araqmeh, -fpermissive is it then I guess
19:58:29fowlthere's a const_cast that can be used for that
19:58:48Araqbut it comes from:
19:58:50AraqLOC17 = gai_strerror(gairesult_106609);
19:59:15Araqwhere gai_strerror is from some {.header.}
19:59:33Araqand so how should nimrod's code gen know it's "const" somewhere in there?
20:00:38fowlim not sure
20:00:43Araqoh hrm ... I guess we shouldn't get it from the header file then
20:00:58Araqbut then redeclaring it will trigger some other error
20:01:39fowli used to think let should declare things const like let x = "foo" would be `const char* x = "foo"` but i think `char * const x = "foo"` is more true to the behavior of `let`
20:02:12Araqindeed plus it's hacky
20:02:20Araqbetter would be yet another pragma
20:02:50Araqon the other hand -fpermissive solves it nicely
20:03:00AraqC++'s const is broken anyway
20:03:29Araqyou can't pass a vector<string> to a vector<const string>
20:03:46Araqeven though the method promises not to change it
20:05:54Araqcompiler/nimcache/sockets.cpp:228:41: error: new declaration ‘char* gai_strerror(int)’
20:05:56AraqIn file included from compiler/nimcache/sockets.cpp:14:0:
20:05:57Araq/usr/include/netdb.h:673:22: error: ambiguates old declaration ‘const char* gai_strerror(int)’
20:06:10Araqyeah ... redeclaring doesn't work
20:06:24Araqunless nothing ever includes netdb.h
20:11:19DAddYE_Araq: static inline int rd_kafka_outq_len (rd_kafka_t *rk) __attribute__((unused));
20:11:29DAddYE_Araq: Error: ';' expected
20:11:34*DAddYE_ is now known as DAddUE
20:11:45Araq#def __attribute__(x)
20:11:46*DAddUE is now known as DAddYE
20:12:18Araqinline functions without body are nice in headers btw
20:16:18DAddYEAraq: perfect thx
20:20:37Araqping zahary___
20:24:17DAddYEwhat about void (*func)(void); ?
20:24:50fowlthats a pointer to a function (void) -> void
20:25:04fowldoes it not translate?
20:25:13DAddYEno
20:25:26DAddYEError: identifier expected, but found '*'
20:26:17fowlid just comment it out and add it in later as func: proc() {.cdecl.}
20:26:38fowlits in a struct right
20:27:22DAddYEok
20:30:37Araqgah nimrod should really use a different nimcache for C++ output ...
20:30:55Araqdifferent .o files confuse the compiler
20:31:39gradhaor use the same directory but force manually different object extensions, like .oo (c++) or .oc (objc)?
20:33:53Araqthat sounds bad
20:34:05Araqgcc uses the extension to determine what to do
20:34:19gradhathat sounds equally bad
20:34:42AraqI like it, extensions define file types
20:54:04*gradha quit (Quit: bbl, have youtube videos to watch)
21:02:26*comex is now known as HARLOT_SAFE
21:07:00*HARLOT_SAFE is now known as co
21:15:31NimBotAraq/Nimrod master 5a3f0c2 Araq [+0 ±5 -0]: fixes #466
21:16:19NimBotAraq/Nimrod master 7bcb383 Billingsly Wetherfordshire [+0 ±1 -0]: made macros.dumptree and dumplisp immediate, deprecated the *_imm versions
21:16:19NimBotAraq/Nimrod master 50d4ed4 Billingsly Wetherfordshire [+0 ±1 -0]: Update news.txt
21:16:19NimBotAraq/Nimrod master d2b4fa5 Araq [+0 ±2 -0]: Merge pull request #464 from fowlmouth/patch-8... 2 more lines
21:18:57NimBotAraq/Nimrod master 80ae295 Billingsly Wetherfordshire [+0 ±1 -0]: use proper types in lua... 4 more lines
21:18:57NimBotAraq/Nimrod master 00ca5d0 Billingsly Wetherfordshire [+0 ±1 -0]: cleaned up lua.nim
21:18:57NimBotAraq/Nimrod master ef2a0bd Billingsly Wetherfordshire [+0 ±1 -0]: cleaned up lualib.nim
21:18:57NimBotAraq/Nimrod master 6f2b767 Araq [+0 ±3 -0]: Merge pull request #467 from fowlmouth/patch-9... 2 more lines
21:25:59reactormonkAraq, good, I can pass raise a pointer to an exception... in the flash. Different address space. Where do I add the logic when raise accesses the exception?
21:28:49Araqsystem/excpt.nim, raiseException
21:29:39reactormonkthanks.
21:30:02Araqsystem.nim, getCurrentException
21:31:19*co is now known as twilight_sparkle
21:31:49*twilight_sparkle is now known as Guest741
21:32:06*Guest741 is now known as comex
22:07:29*ARCADIVS joined #nimrod
22:08:56dom96TIL comex likes My Little Pony.
22:09:03comexindeed.
22:18:54reactormonkAraq, sweet, thank you.
23:30:39*q66 quit (Remote host closed the connection)