00:07:41 | fowl | Araq, 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:48 | fowl | there 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:17 | OrionPK | there'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:25 | fowl | Error: invalid pragma: importc: "lua_$1" |
07:23:29 | fowl | wut -_- |
07:27:52 | fowl | this works in lauxlib.nim but not in lua.nim |
07:27:57 | fowl | {.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 | _ponce | how do I get command line arguments? |
12:36:46 | tangentstorm | paramstr |
12:36:54 | tangentstorm | paramstr(1) is the first, etc. |
12:37:07 | tangentstorm | paramcount is the count. |
12:37:22 | tangentstorm | _ponce: ^ |
12:38:32 | _ponce | thanks |
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:03 | Araq | gradha: still waiting for your readline patch ;-) |
17:29:13 | gradha | I'll first send you some idetools tests, maybe today if I manage to not watch too much youtube |
17:30:02 | gradha | I was hoping to use idetools output as a basis for the hyperlinking toc but I see it also generates pragma information |
17:30:24 | Araq | what? |
17:30:39 | Araq | what's "pragma information" and why is it bad? |
17:30:47 | gradha | system.& generates proc (string, string): string{.noSideEffect.} |
17:31:03 | gradha | not that it's bad, since it's easy to strip |
17:31:15 | gradha | but it makes me wonder if that should be part of the signature or some extra column |
17:31:53 | Araq | noSideEffect, tags, raises, immediate are part of the signature, the others are debatable I think |
17:32:41 | gradha | thas that mean you could have two procs which only differentiate themselves by the pragma? |
17:35:57 | gradha | I 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:46 | gradha | also the return value would fall off for that constrained definition of signature |
17:37:08 | DAddYE | Hi Araq! First congrats for this exceptional project |
17:38:27 | DAddYE | I'm not a well experienced c programmer, I come from ruby-land and clojure-land |
17:38:40 | DAddYE | so I'm wondering if u plan to improve c2nim |
17:39:13 | gradha | IIRC the official position is "patches are welcome", especially if they improve C++ parsing |
17:39:30 | gradha | what do you want to use c2nim for? |
17:40:09 | DAddYE | gradha: right now to parse https://github.com/edenhill/librdkafka/blob/master/rdkafka.h |
17:40:21 | DAddYE | usr/src/extras/librdkafka/rdkafka.h(91, 7) Error: identifier expected, but found '#' |
17:41:10 | gradha | hmm... maybe the problem is the define happening in the middle of the struct, could you try moving that before the typedef? |
17:41:16 | Araq | move those #defines out of the struct decls |
17:41:49 | DAddYE | I did |
17:41:51 | DAddYE | no luck |
17:42:35 | DAddYE | it stops usr/src/extras/librdkafka/rdkafka.h(108, 9) Error: identifier expected, but found '{' |
17:42:52 | gradha | maybe the nested struct? |
17:42:55 | Araq | well the nested struct declarations are evil too ;-) |
17:42:58 | DAddYE | gradha: yes |
17:43:09 | Araq | ok, gradha continues :-) |
17:43:14 | DAddYE | it stop struct { |
17:43:34 | gradha | you could try unnesting the struct and typedefing it, then using it like that inside the other |
17:43:50 | DAddYE | gradha: oki thanks |
17:43:58 | DAddYE | another little question |
17:44:47 | DAddYE | do you have plans for some like goroutines and go channels? |
17:45:38 | gradha | goroutines aka continuations? see if http://forum.nimrod-code.org/t/155 answers |
17:45:59 | gradha | there are threads and you can use channels between them, but compared to continuations they are heavy |
17:47:50 | dom96 | if nobody else picks it up, I will resume work on continuations in about a month. |
17:48:53 | DAddYE | ok thanks, makes sense |
17:50:25 | Araq | but continuations are different from goroutines |
17:50:44 | Araq | and nimrod's first class iterators are no continuations either ;-) |
17:51:05 | NimBot | nimrod-code/babel master 7ab81d5 Billingsly Wetherfordshire [+0 ±1 -0]: Update babel.nim... 2 more lines |
17:51:05 | NimBot | nimrod-code/babel master 8016ef9 Dominik Picheta [+0 ±1 -0]: Merge pull request #6 from fowlmouth/patch-3... 2 more lines |
17:51:16 | Araq | DAddYE: there is a new concurrency system in the works which ensures race and deadlock freedom at compile time |
17:52:19 | DAddYE | Araq: that's is a super good news |
17:52:40 | DAddYE | concurrency, forking and so on today are a must have :D |
17:52:54 | Araq | well it won't be as cheesy as Go's concurrency model ;-) |
17:53:08 | Araq | but then Go ensures nothing whatsoever at compile time ... |
17:53:34 | dom96 | Araq: Aren't goroutines basically C#'s await? |
17:53:53 | Araq | dom96: no they are not, they "capture the stack" |
17:56:43 | tangentstorm | Araq: are you familiar with SuperPascal? |
17:56:47 | DAddYE | Araq: is there a workaround for commas in macros: TAILQ_HEAD(, rd_kafka_op_s)? |
17:57:13 | tangentstorm | http://en.wikipedia.org/wiki/SuperPascal |
17:59:34 | Araq | tangentstorm: no, but I studied occam |
18:00:21 | tangentstorm | I haven't worked much with it, but IIRC it made similar claims about compile-time guarantees. |
18:00:31 | tangentstorm | source is here: https://github.com/tangentstorm/pascal/tree/master/super |
18:00:52 | tangentstorm | also here: http://brinch-hansen.net/ |
18:01:31 | tangentstorm | here we go. interference control in super pascal: http://brinch-hansen.net/papers/1994d.pdf |
18:02:14 | tangentstorm | Haven't read that one yet, but he was a pretty solid writer. |
18:12:04 | Araq | parallelPascal omits procedural parameters and pointers, so no thanks ;-) |
18:13:07 | tangentstorm | :) Wasn't advocating for it or anything, just thought you might find it interesting. |
18:30:28 | DAddYE | Araq: is there a workaround for c2nim for commas in macros: TAILQ_HEAD(, rd_kafka_op_s)? |
18:32:09 | gradha | that macro seems to be a wrapper for a type, depending on the macro you may want to unwrap it completely |
18:35:43 | DAddYE | gradha: thx |
18:35:44 | gradha | you 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:55 | gradha | see what "cpp header.h|less" gives out |
18:38:16 | gradha | _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:08 | gradha | oooh man, I have to hyperlink its examples for the web |
18:41:12 | fowl | gradha, can you write an android app using only the ndk/jni |
18:41:59 | gradha | up 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:15 | gradha | after all, that's what presumably the marmalade sdk guys are doing with their C++ framework |
18:43:48 | gradha | ok, that should have been 2.3, search for NativeActivity at https://developer.android.com/tools/sdk/ndk/index.html |
18:50:00 | fowl | looks 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:01 | gradha | Araq: default parameters aren't included in idetools for skProc, what do you think about them? |
19:37:26 | Araq | they should be included |
19:38:40 | Araq | DAddYE_: you may have to transform #define X(....) .... into #def X(...) ... |
19:39:04 | Araq | but I never tested an empty argument with the #def replace mechanism so I don't know if it works |
19:40:12 | Araq | I wonder if there is a single C header file out there that uses no obsure C feature ... |
19:48:22 | apotheon | I'm sure there are several. |
19:48:53 | apotheon | Half a dozen, at least. |
19:49:09 | Araq | never encountered any except lua.h perhaps |
19:50:50 | Araq | but 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:24 | Araq | effectively using only some subset of C for the interface |
19:51:25 | fowl | Araq, lua 5.2 will require a separate define or a separate module alltogether |
19:51:46 | Araq | which is exactly C++'s solution, but C++ is bad mmkay? |
19:52:30 | Araq | fowl: I think you should make a lua52.nim module |
19:52:57 | fowl | good me too |
19:53:24 | Araq | and include the funny lauxlib and lualib stuff in the same module too |
19:53:46 | Araq | nobody cares about that split anyway |
19:54:16 | fowl | its dumb that they're split up anyways, they all use the same dynlib |
19:54:28 | Araq | that's what I mean, yes |
19:55:12 | fowl | how do you reference an issue from a commit? do you just include #issuenumber in the description? |
19:55:20 | Araq | yep |
19:57:38 | Araq | any idea what to do about: |
19:57:40 | Araq | compiler/nimcache/sockets.cpp:699:42: error: invalid conversion from ‘const char*’ to ‘NCSTRING {aka char*}’ [-fpermissive] |
19:57:54 | Araq | that keeps nimrod from bootstrapping in C++ mode |
19:58:09 | Araq | meh, -fpermissive is it then I guess |
19:58:29 | fowl | there's a const_cast that can be used for that |
19:58:48 | Araq | but it comes from: |
19:58:50 | Araq | LOC17 = gai_strerror(gairesult_106609); |
19:59:15 | Araq | where gai_strerror is from some {.header.} |
19:59:33 | Araq | and so how should nimrod's code gen know it's "const" somewhere in there? |
20:00:38 | fowl | im not sure |
20:00:43 | Araq | oh hrm ... I guess we shouldn't get it from the header file then |
20:00:58 | Araq | but then redeclaring it will trigger some other error |
20:01:39 | fowl | i 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:12 | Araq | indeed plus it's hacky |
20:02:20 | Araq | better would be yet another pragma |
20:02:50 | Araq | on the other hand -fpermissive solves it nicely |
20:03:00 | Araq | C++'s const is broken anyway |
20:03:29 | Araq | you can't pass a vector<string> to a vector<const string> |
20:03:46 | Araq | even though the method promises not to change it |
20:05:54 | Araq | compiler/nimcache/sockets.cpp:228:41: error: new declaration ‘char* gai_strerror(int)’ |
20:05:56 | Araq | In file included from compiler/nimcache/sockets.cpp:14:0: |
20:05:57 | Araq | /usr/include/netdb.h:673:22: error: ambiguates old declaration ‘const char* gai_strerror(int)’ |
20:06:10 | Araq | yeah ... redeclaring doesn't work |
20:06:24 | Araq | unless nothing ever includes netdb.h |
20:11:19 | DAddYE_ | Araq: static inline int rd_kafka_outq_len (rd_kafka_t *rk) __attribute__((unused)); |
20:11:29 | DAddYE_ | Araq: Error: ';' expected |
20:11:34 | * | DAddYE_ is now known as DAddUE |
20:11:45 | Araq | #def __attribute__(x) |
20:11:46 | * | DAddUE is now known as DAddYE |
20:12:18 | Araq | inline functions without body are nice in headers btw |
20:16:18 | DAddYE | Araq: perfect thx |
20:20:37 | Araq | ping zahary___ |
20:24:17 | DAddYE | what about void (*func)(void); ? |
20:24:50 | fowl | thats a pointer to a function (void) -> void |
20:25:04 | fowl | does it not translate? |
20:25:13 | DAddYE | no |
20:25:26 | DAddYE | Error: identifier expected, but found '*' |
20:26:17 | fowl | id just comment it out and add it in later as func: proc() {.cdecl.} |
20:26:38 | fowl | its in a struct right |
20:27:22 | DAddYE | ok |
20:30:37 | Araq | gah nimrod should really use a different nimcache for C++ output ... |
20:30:55 | Araq | different .o files confuse the compiler |
20:31:39 | gradha | or use the same directory but force manually different object extensions, like .oo (c++) or .oc (objc)? |
20:33:53 | Araq | that sounds bad |
20:34:05 | Araq | gcc uses the extension to determine what to do |
20:34:19 | gradha | that sounds equally bad |
20:34:42 | Araq | I 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:31 | NimBot | Araq/Nimrod master 5a3f0c2 Araq [+0 ±5 -0]: fixes #466 |
21:16:19 | NimBot | Araq/Nimrod master 7bcb383 Billingsly Wetherfordshire [+0 ±1 -0]: made macros.dumptree and dumplisp immediate, deprecated the *_imm versions |
21:16:19 | NimBot | Araq/Nimrod master 50d4ed4 Billingsly Wetherfordshire [+0 ±1 -0]: Update news.txt |
21:16:19 | NimBot | Araq/Nimrod master d2b4fa5 Araq [+0 ±2 -0]: Merge pull request #464 from fowlmouth/patch-8... 2 more lines |
21:18:57 | NimBot | Araq/Nimrod master 80ae295 Billingsly Wetherfordshire [+0 ±1 -0]: use proper types in lua... 4 more lines |
21:18:57 | NimBot | Araq/Nimrod master 00ca5d0 Billingsly Wetherfordshire [+0 ±1 -0]: cleaned up lua.nim |
21:18:57 | NimBot | Araq/Nimrod master ef2a0bd Billingsly Wetherfordshire [+0 ±1 -0]: cleaned up lualib.nim |
21:18:57 | NimBot | Araq/Nimrod master 6f2b767 Araq [+0 ±3 -0]: Merge pull request #467 from fowlmouth/patch-9... 2 more lines |
21:25:59 | reactormonk | Araq, 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:49 | Araq | system/excpt.nim, raiseException |
21:29:39 | reactormonk | thanks. |
21:30:02 | Araq | system.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:56 | dom96 | TIL comex likes My Little Pony. |
22:09:03 | comex | indeed. |
22:18:54 | reactormonk | Araq, sweet, thank you. |
23:30:39 | * | q66 quit (Remote host closed the connection) |