00:25:04 | * | bjz_ quit (Ping timeout: 240 seconds) |
00:27:11 | * | superfunc quit (Ping timeout: 272 seconds) |
00:29:43 | Varriount | Araq: Oh fine. But I can't promise efficiency. |
00:41:09 | * | brson quit (Quit: leaving) |
00:44:37 | Varriount | Araq: Should the filemon module be part of the stdlib, or a babel package? |
00:57:46 | * | Joe_knock quit (Quit: Leaving) |
01:07:37 | * | lyro_ quit (Remote host closed the connection) |
01:12:21 | * | ARCADIVS quit (Quit: WeeChat 0.4.3) |
01:34:19 | * | EXetoC quit (Quit: WeeChat 0.4.3) |
01:40:49 | * | q66 quit (Quit: Leaving) |
01:49:08 | * | xenagi joined #nimrod |
02:22:48 | * | Demos joined #nimrod |
02:23:54 | * | Demos__ quit (Ping timeout: 250 seconds) |
02:30:25 | * | willwillson quit (Ping timeout: 255 seconds) |
02:31:04 | OrionPK | everything should be babel! |
02:31:33 | Varriount | OrionPK: It's just that, filemonitoring is a bit specialized for a standard library. |
02:31:49 | Varriount | Then again, it's so hard to implement across platforms. *glares at windows* |
02:37:30 | OrionPK | i think moving things out of the stdlib and into the package manager is the general trend for everything |
02:38:42 | Varriount | OrionPK: I don't neccesarily agree with the idea for all things. |
02:39:37 | * | Jesin quit (Quit: Leaving) |
02:42:17 | * | saml_ quit (Remote host closed the connection) |
02:42:20 | * | Jesin joined #nimrod |
03:00:10 | * | adoniscik joined #nimrod |
03:01:48 | OrionPK | me either |
03:02:06 | OrionPK | necessarily |
03:02:37 | OrionPK | but the stdlib is weakish |
03:02:51 | OrionPK | and buggy |
03:03:42 | OrionPK | the package manager allows things to be more split up |
03:03:54 | OrionPK | so authors can update packages more readily |
03:10:23 | * | flaviu quit (Ping timeout: 240 seconds) |
03:15:23 | * | flaviu joined #nimrod |
03:49:32 | * | flaviu quit (Ping timeout: 240 seconds) |
04:06:48 | Skrylar | hrm |
04:06:55 | Skrylar | i didn't know that importc could be pushed, let alone with wildcards |
04:19:40 | * | xenagi quit (Quit: Leaving) |
04:44:09 | Skrylar | wat. emacs has a 'glasses-mode' which makes it render underscores in the middle of camelCase words |
04:50:56 | * | ome joined #nimrod |
05:41:06 | * | lyro_ joined #nimrod |
05:44:27 | * | gkoller joined #nimrod |
05:55:57 | * | gkoller quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:58:03 | * | lyro_ quit (Ping timeout: 240 seconds) |
06:03:05 | * | kshlm joined #nimrod |
06:05:25 | * | lyro_ joined #nimrod |
06:22:00 | * | gkoller joined #nimrod |
06:34:20 | * | gkoller quit (Quit: Textual IRC Client: www.textualapp.com) |
06:34:46 | * | gkoller joined #nimrod |
06:48:54 | NimBot | Araq/Nimrod devel 05dbba0 Araq [+0 ±1 -0]: fixes #1431 |
06:48:54 | NimBot | Araq/Nimrod devel b8ce3a4 Araq [+1 ±7 -0]: fixes 'gcsafe' |
06:48:54 | NimBot | Araq/Nimrod devel d1300de Araq [+0 ±2 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
06:52:36 | * | endou__ joined #nimrod |
07:08:18 | * | lyro_ quit (Ping timeout: 246 seconds) |
07:08:37 | * | gkoller quit (Quit: Textual IRC Client: www.textualapp.com) |
07:08:51 | * | gkoller joined #nimrod |
07:09:11 | * | gs joined #nimrod |
07:10:51 | * | lyro_ joined #nimrod |
07:15:04 | * | kunev joined #nimrod |
07:26:45 | * | gkoller quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:33:52 | gs | Can someone explain to me why AST nodes (PNimrodNode) are copied (or somehow lose their identity) when they are in an array/seq? http://pastebin.com/YrvXXTd9 |
07:48:07 | Araq | gs: well, it's (yet another) bug. However, the reference semantics of nodes is really hard to model in the VM |
07:53:22 | gs | Araq: So there's no trick to work around that? |
07:54:48 | Araq | try a seq instead of an array? I dunno, I'm quite sure there is a workaround |
08:09:22 | * | lyro__ joined #nimrod |
08:09:28 | * | lyro__ quit (Client Quit) |
08:09:38 | * | lyro quit (Remote host closed the connection) |
08:09:49 | * | lyro joined #nimrod |
08:12:50 | NimBot | Araq/Nimrod devel 4d863eb Araq [+0 ±7 -0]: fix failed tests due to gcsafe |
08:14:18 | * | adoniscik quit (Ping timeout: 260 seconds) |
08:15:55 | * | lyro quit (Quit: WeeChat 0.4.3) |
08:16:25 | * | lyro joined #nimrod |
08:25:03 | * | io2 joined #nimrod |
08:26:00 | * | Demos quit (Ping timeout: 272 seconds) |
08:27:55 | * | darkf_ joined #nimrod |
08:28:44 | * | lyro quit (Quit: WeeChat 0.4.3) |
08:29:00 | * | darkf quit (Ping timeout: 260 seconds) |
08:33:01 | * | lyro joined #nimrod |
08:35:49 | * | lyro_ quit (Quit: IRC for Sailfish 0.8) |
08:41:07 | * | zahary quit (Quit: Leaving.) |
08:41:33 | * | darkf_ is now known as darkf |
08:54:32 | gs | Araq: Yeah, that didn't work either. I just got rid of some helpers and did it in a single macro... So I took the "missing" mitems/mpairs iterators we discussed yesterday as an opportunity to familiarize myself with macros. What do you think about implementing m{items,pairs} like this [https://gist.github.com/gsps/ccc4c433df2dc7b3792c]? |
09:10:05 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
09:21:27 | * | silven_ joined #nimrod |
09:21:30 | * | silven quit (Ping timeout: 260 seconds) |
09:35:10 | reactormonk | gs, that link 404s |
09:39:10 | gs | reactormonk: sorry, should't have used the brackets. https://gist.github.com/gsps/ccc4c433df2dc7b3792c |
09:48:20 | * | zling_ quit (Ping timeout: 272 seconds) |
09:48:45 | * | TylerE quit (Ping timeout: 240 seconds) |
09:48:56 | * | ome quit (Ping timeout: 250 seconds) |
09:51:01 | * | ome joined #nimrod |
09:53:03 | * | CARAM quit (Ping timeout: 240 seconds) |
09:54:22 | * | TylerE joined #nimrod |
09:55:15 | * | zling_ joined #nimrod |
09:55:40 | * | kshlm quit (Remote host closed the connection) |
09:56:37 | * | kshlm joined #nimrod |
09:59:01 | * | kshlm quit (Remote host closed the connection) |
10:01:04 | * | CARAM joined #nimrod |
10:06:47 | * | Ven joined #nimrod |
10:13:07 | * | gs quit (Ping timeout: 246 seconds) |
10:14:44 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:22:27 | * | gs joined #nimrod |
10:34:44 | * | silven joined #nimrod |
10:35:00 | * | silven_ quit (Ping timeout: 260 seconds) |
10:56:31 | * | gs quit (Ping timeout: 246 seconds) |
12:07:32 | * | ome quit (Quit: Connection closed for inactivity) |
12:19:07 | * | gkoller joined #nimrod |
12:22:04 | * | gkoller quit (Client Quit) |
12:22:18 | * | gkoller joined #nimrod |
12:25:52 | * | gs joined #nimrod |
12:38:13 | * | darkf quit (Quit: Leaving) |
12:53:06 | * | gkoller quit (Quit: Textual IRC Client: www.textualapp.com) |
13:04:21 | * | gkoller joined #nimrod |
13:05:18 | * | gkoller quit (Client Quit) |
13:05:43 | * | gkoller joined #nimrod |
13:14:16 | * | bogen left #nimrod (#nimrod) |
13:36:57 | * | willwillson joined #nimrod |
13:53:35 | * | Matthias247 joined #nimrod |
13:57:45 | willwillson | When you do a: when defined(Linux), does that refer to the host os or the target os? I am looking for a way to identify the target os. |
14:04:58 | willwillson | Nevermind, I got my answer with: nimrod --os:Windows --cpu:arm dump |
14:20:20 | * | ome joined #nimrod |
14:23:43 | * | gs quit (Ping timeout: 246 seconds) |
14:31:40 | * | gs joined #nimrod |
14:54:50 | * | johnsoft quit (Quit: Leaving) |
15:46:51 | * | johnsoft joined #nimrod |
15:49:37 | * | adoniscik joined #nimrod |
15:55:54 | * | EXetoC joined #nimrod |
15:56:02 | * | io2 joined #nimrod |
15:59:33 | * | gkoller quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
16:06:20 | * | kunev quit (Quit: leaving) |
16:30:59 | * | ehaliewicz joined #nimrod |
16:33:45 | ehaliewicz | other than the constructor syntax and named members, is there any difference between a tuple and an array? |
16:36:22 | * | gs quit (Ping timeout: 246 seconds) |
16:45:46 | * | brson joined #nimrod |
17:05:01 | * | q66 joined #nimrod |
17:10:38 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:12:27 | dom96 | hi |
17:19:45 | Araq | ehaliewicz: they are completely different, tuple[a: int; b: float] cannot be an array |
17:20:04 | ehaliewicz | sure, but if it's a tuple of the same types |
17:20:06 | ehaliewicz | i meant |
17:20:57 | Araq | then you can't do tup[i] where i is a runtime value |
17:21:21 | Araq | but IF you don't care about that either, they are the same ;-) |
17:23:42 | ehaliewicz | well i'm prematurely optimizing so i gotta be sure about these things ;) |
17:29:00 | Araq | premature optimization is the root of all fun. |
17:38:32 | * | Demos joined #nimrod |
17:45:00 | ehaliewicz | agreed |
17:50:16 | NimBot | Araq/Nimrod devel 272fd42 Nick Greenfield [+0 ±2 -0]: Add automatic MAP_POPULATE flag for opening read_only (MAP_PRIVATE) and shared (MAP_SHARED) mmap files. |
17:50:16 | NimBot | Araq/Nimrod devel cba75db Nick Greenfield [+0 ±1 -0]: Do not automatically use MAP_POPULATE for opening mmap files.... 3 more lines |
17:50:16 | NimBot | Araq/Nimrod devel 3a57052 Nick Greenfield [+0 ±1 -0]: Revert "Do not automatically use MAP_POPULATE for opening mmap files."... 5 more lines |
17:50:16 | NimBot | Araq/Nimrod devel a0df72f Nick Greenfield [+0 ±1 -0]: Only try to import MAP_POPULATE on Linux, define flag as 0 otherwise. |
17:50:16 | NimBot | 1 more commits. |
17:50:53 | * | willwillson quit (Ping timeout: 240 seconds) |
17:59:34 | NimBot | Araq/Nimrod devel 2ade6ab Grzegorz Adam Hankiewicz [+0 ±2 -0]: Documents nimcache file naming scheme. Refs #852. |
17:59:34 | NimBot | Araq/Nimrod devel bb34d03 Grzegorz Adam Hankiewicz [+0 ±2 -0]: Makes ios example work again with new paths. Refs #852. |
17:59:34 | NimBot | Araq/Nimrod devel d47971b Grzegorz Adam Hankiewicz [+0 ±1 -0]: Corrects description of nimcache file naming. Refs #852. |
17:59:34 | NimBot | Araq/Nimrod devel 15eea19 Andreas Rumpf [+0 ±4 -0]: Merge pull request #1417 from gradha/pr_852_nimcache_naming... 2 more lines |
18:00:25 | NimBot | Araq/Nimrod devel 5e2614a def [+0 ±1 -0]: Add newSeqWith |
18:00:25 | NimBot | Araq/Nimrod devel 61a6ecf def [+0 ±2 -0]: Move newSeqWith to sequtils |
18:00:25 | NimBot | Araq/Nimrod devel b1bfd51 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1403 from def-/newseqwith... 2 more lines |
18:06:27 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
18:09:45 | * | ehaliewi` joined #nimrod |
18:10:37 | * | ehaliewi` quit (Remote host closed the connection) |
18:10:42 | * | skyfex quit (Quit: Computer has gone to sleep.) |
18:11:10 | * | ehaliewicz quit (Ping timeout: 250 seconds) |
18:11:16 | * | skyfex joined #nimrod |
18:49:34 | * | Jesin quit (Quit: Leaving) |
18:51:13 | * | Jesin joined #nimrod |
18:59:35 | * | shodan45 joined #nimrod |
19:06:00 | Skrylar | ok so quick check |
19:06:08 | Skrylar | is there an actively maintained opengl module in nimrod at the moment? |
19:07:03 | dom96 | https://github.com/nimrod-code/opengl |
19:07:28 | Skrylar | dom96: EXetoC said he wasn't using that anymore |
19:07:52 | dom96 | why? |
19:08:10 | Skrylar | I don't know the specifics. I inquired if he was still using it, he said no, thus the question. |
19:08:10 | dom96 | it's the official wrapper |
19:10:12 | * | Jehan_ joined #nimrod |
19:10:47 | Demos | the OpenGL module works just fine for me |
19:11:03 | dom96 | maybe he meant that he wasn't doing opengl stuff anymore |
19:11:09 | Demos | pretty much just a simple wrapper with the addition of extension loading and error checking |
19:14:43 | Skrylar | i'll poke with it later then |
19:15:03 | * | Matthias247 joined #nimrod |
19:15:48 | Demos | it pulls in the X11 package on windows which is kinda strange |
19:17:55 | Skrylar | :| |
19:18:17 | dom96 | that's a babel limitation |
19:18:37 | Demos | do it actually use X11 on linux, like call it directly? |
19:18:45 | dom96 | dunno |
19:19:06 | Demos | I mean the openGL module is not going to actually create a context for you |
19:19:32 | Demos | although I guess it /may/ give you the wgl or glx extensions (but only after you have the context) |
19:19:51 | Demos | or actually it may load those extensions |
19:20:19 | Demos | but I don't see why you need an X11 wrapper to load the glx extensions |
19:21:00 | dom96 | check the source |
19:21:38 | * | willwillson joined #nimrod |
19:22:33 | * | zahary joined #nimrod |
19:24:35 | EXetoC | Skrylar: I was going to say that it works apart from one bug, but I think I fixed it |
19:24:55 | EXetoC | it's synced with 4.4, and there isn't much to maintain |
19:25:32 | * | io2 joined #nimrod |
19:25:36 | * | io2 quit (Changing host) |
19:25:36 | * | io2 joined #nimrod |
19:26:47 | Skrylar | EXetoC: i might be able to cop out and get by with just SDL instead xD |
19:26:49 | Skrylar | for a time, anyway |
19:27:01 | Skrylar | Looking at the spec, all I need GL for is 3d dice |
19:27:28 | Skrylar | which can be faked by pre-rendering, admittedly without users being able to load their own icon sets |
19:37:52 | adoniscik | c2nim chokes on nested ifdefs, right? |
19:47:26 | * | flaviu joined #nimrod |
19:47:45 | Araq | adoniscik: depends |
19:47:57 | Araq | but usually you need to tweak these |
19:50:15 | * | untitaker quit (Ping timeout: 246 seconds) |
19:56:06 | * | untitaker joined #nimrod |
19:58:53 | * | ARCADIVS joined #nimrod |
20:04:26 | Araq | Jehan_: do you think we should introduce {.locks: <lockLevel.}> already instead of breaking everything once we get this feature? |
20:04:47 | Jehan_ | Araq: Umm, lacking context here? |
20:05:09 | Araq | well with .gcsafe we broke code |
20:05:09 | Jehan_ | I'm not up to date on what you're planning with respect to that. |
20:05:28 | Jehan_ | lock levels, that is. |
20:07:50 | Araq | whenever we introduce yet another effect, we break code |
20:08:26 | Jehan_ | Yes. |
20:08:40 | Jehan_ | And if lock levels do what I think they do, they will. |
20:08:51 | Jehan_ | Been there, done that. :) |
20:10:22 | Jehan_ | That said, you probably want an "ignore locking priority for this" feature, anyway. |
20:19:29 | Araq | no, we have a general mechanism to circumvent the effect system. it's called 'cast' |
20:22:38 | Araq | however, we need a shortcut for {.gcsafe, locks: nothing.} |
20:23:37 | Araq | {.threadsafe.} ? |
20:24:01 | Jehan_ | Hmm, that's usually thought to mean something different. |
20:25:01 | Araq | oh yeah |
20:25:05 | Araq | that's bad |
20:26:25 | dom96 | Araq: Did you just shove 'inclrtl' into every stdlib module? |
20:26:33 | Jehan_ | {.syncsafe.}? |
20:26:36 | Araq | dom96: yes |
20:26:48 | dom96 | Araq: why? |
20:26:52 | Araq | .begign though this means something different too wrt data races |
20:26:59 | Araq | *benign |
20:27:31 | Araq | .innocent |
20:27:45 | dom96 | locks: nil? |
20:28:13 | Araq | dom96: yes, but we need a word for: gcsafe+locks: nil |
20:31:12 | dom96 | I got nothing. |
20:31:26 | Araq | so? any opinions? |
20:32:24 | Jehan_ | benign/innocent sound a bit too generic to me. |
20:32:40 | Jehan_ | Not that I have a better idea, mind you. :) |
20:33:17 | Jehan_ | {.noGruesHere.} would only confuse people, I think. |
20:33:44 | Araq | that's actually the point |
20:34:19 | Araq | so that we can add new restrictions to .innocent |
20:34:25 | Araq | and most code continues to work |
20:34:37 | Jehan_ | Well, what concept do you want it to express? |
20:34:46 | Araq | except for the code that doesn't and then you need to expand it manually |
20:35:12 | reactormonk | Araq, syncsafe? So basically functional? ^^ |
20:35:22 | Araq | well most callbacks need to be .gcsafe now |
20:35:36 | Araq | soon they need to be locks: nil too |
20:36:19 | Araq | and then perhaps: dontLent (for all pointer arguments) |
20:36:36 | Araq | er ... onlyLent |
20:37:14 | EXetoC | will this be a pragma pragma? |
20:37:50 | Araq | EXetoC: yes but that doesn't mean it doesn't need a good name |
20:39:17 | Jehan_ | atomic is too overloaded, and reentrant doesn't capture the intent. |
20:39:52 | Araq | yeah, but as I said, we need a generic term |
20:39:56 | dom96 | Araq: I still don't get gcsafe. |
20:40:12 | dom96 | If I'm marking every closure with it why not make it default? |
20:40:38 | Araq | dom96: consistency with the rest of the effect system |
20:40:55 | Araq | the default is unrestrictive and then you add annotations to make it more restrictive |
20:41:13 | EXetoC | I don't know what that means for a compact lambda syntax |
20:41:21 | dom96 | That sounds like a PITA |
20:41:29 | Araq | well, maybe we need to abandon this consistency |
20:42:22 | Araq | however |
20:42:33 | Araq | it is the right default for the compiler itself |
20:42:44 | Araq | and for scripting IMO |
20:42:57 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
20:44:06 | Araq | EXetoC: lambdas are not affected and procs in general are hardly affected, but *proc types* are |
20:46:15 | Araq | maybe we should simply name it .good, lol |
20:46:27 | Araq | brb |
20:46:45 | NimBot | Araq/Nimrod devel 1ee87b8 Araq [+0 ±1 -0]: asyncio compiles again |
20:46:45 | NimBot | Araq/Nimrod devel 9e772a8 Araq [+0 ±7 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
21:00:18 | * | nande joined #nimrod |
21:00:34 | Araq | back. any further ideas? |
21:00:58 | reactormonk | Araq, cool, you did the github issue walk ;-) |
21:01:25 | reactormonk | Any discussion on the how to test by default? It's easier to start if there's some basic setup. |
21:05:03 | * | zahary quit (Quit: Leaving.) |
21:05:41 | Araq | there is this thing called "grammar driven speaking" |
21:06:45 | Araq | oops ... I mean "test driven development" :P |
21:07:31 | * | io2 joined #nimrod |
21:08:50 | adoniscik | How can I translate C's "double _Complex" to nimrod? |
21:09:58 | adoniscik | http://en.wikipedia.org/wiki/Complex.h#complex.h |
21:10:34 | Araq | ugh, does anybody use this C99 crap? |
21:10:42 | adoniscik | numerical libraries |
21:12:36 | Araq | they couldn't add 'addWithOverflowCheck' but '_Complex'. This says everything about the standard. |
21:13:07 | adoniscik | maybe I can roll my own object. do nimrod objects store components contiguously in memory? |
21:13:34 | Araq | anyway, I'd use tuple[re, im: float] and check its layout matches |
21:13:59 | adoniscik | that is, do they store any hidden "variables" before the declared variables? |
21:16:48 | Araq | no they don't unless you use 'object of' |
21:17:57 | adoniscik | okay, that is what I thought. I'll give that a try. I have another question: what does " Error: internal error: expr(skGenericParam); unknown symbol" mean? |
21:18:42 | Araq | that means you're using too few type annotations in a proc header |
21:19:15 | Araq | I think (report it! internal error is a bug) |
21:19:31 | adoniscik | here's an example: http://pastebin.com/EeF9Fy0H |
21:19:51 | Araq | oh, not that again |
21:20:19 | adoniscik | sorry! I don't know how to do matrices and I borrowed code from rosetta |
21:20:41 | adoniscik | that's why it'd be nice to have some reference, like I said before |
21:20:47 | Araq | nobody knows how to do matrices |
21:21:00 | adoniscik | except you, right :) |
21:21:28 | Araq | well I know how to do them without the broken static[T] |
21:21:58 | Araq | apparently I'm the only one |
21:27:33 | * | ome quit (Quit: Connection closed for inactivity) |
21:29:26 | * | adoniscik quit (Ping timeout: 272 seconds) |
21:34:22 | Varriount | Araq: I managed to cause the GC to segfault when handling 'var' parameters |
21:35:22 | Araq | Varriount: well report it |
21:35:46 | Araq | parameters or 'var T' as a return type? |
21:35:58 | Varriount | parameters. |
21:36:52 | Varriount | I don't know how I'm going to write a small example though. The bug is in the file monitoring code you wanted me to finish. |
21:38:50 | Araq | -d:useSysAssert -d:useGcAssert |
21:39:14 | Varriount | Traceback (most recent call last) |
21:39:14 | Varriount | filemon.nim(303) filemon |
21:39:14 | Varriount | asyncdispatch.nim(1055) runForever |
21:39:14 | Varriount | asyncdispatch.nim(203) poll |
21:39:14 | Varriount | filemon.nim(242) rawEventCb |
21:39:15 | Varriount | filemon.nim(171) watchFile |
21:39:17 | Varriount | gc.nim(265) unsureAsgnRef |
21:39:19 | Varriount | gc.nim(216) incRef |
21:39:34 | Araq | that doesn't mean it's a GC bug btw |
21:41:15 | Varriount | Ok, now I get "[SYSASSERT] dealloc 2" with no stack trace (despite running in debug mode) |
21:43:18 | dom96 | Varriount: yay you're working on the file monitoring code :) |
21:43:54 | Varriount | dom96: Yeah. One of the last hurdles is mainting handle consistancy. |
21:44:27 | dom96 | I think I will move the irc module to a babel package. |
21:44:37 | dom96 | Any objections? |
21:47:35 | Araq | no, it's a good idea |
21:47:59 | Araq | I want to move db_mongo to its own babel package, but it doesn't work anymore |
21:48:20 | Araq | or maybe EXetoC fixed it and made it a babel package? |
21:48:51 | * | enquora joined #nimrod |
21:49:58 | dom96 | hello enquora |
21:50:20 | dom96 | Araq: This exists: https://github.com/nimrod-code/mongo |
21:50:27 | * | enquora quit (Remote host closed the connection) |
21:50:29 | EXetoC | it barely works |
21:50:42 | dom96 | EXetoC: what's wrong with it? |
21:50:47 | * | enquora joined #nimrod |
21:51:00 | Araq | ok, that's good enoug to remove it from the stdlib |
21:53:04 | Araq | Varriount: "dealloc 2" means somebody passes an invalid pointer to 'dealloc' |
21:53:52 | dom96 | Varriount: Likely culprit is the overloaded object. |
21:54:07 | dom96 | The dispatcher deallocs it in certain situations. |
21:54:32 | dom96 | (If the request completes immediately you should dealloc it) |
21:59:09 | Araq | Varriount: or rather that the object's header has been corrupted |
21:59:33 | EXetoC | Araq: yeah that module works even less |
21:59:53 | EXetoC | dom96: support for some types is incomplete and only the most basic operations have been added |
22:02:37 | Varriount | Araq: Hm. A corrupted object header might be it. |
22:05:39 | * | tinAndi joined #nimrod |
22:07:03 | Varriount | Araq: If I create a dynamically sized array via unsafeNew, do I need to worry about tracking internal references to its elements? |
22:07:57 | Araq | *unsafeNew* means "don't worry" :P |
22:08:30 | Varriount | Araq: I'm trying to get rid of evil manual memory management. I'd rather use the lesser of two evils if I can. |
22:09:00 | Araq | check how we do it in the async dispatcher |
22:09:53 | Araq | it's possible, but for experts only ;-) |
22:10:06 | Varriount | Araq: If you're talking about allocating the CustomOverlapped object, this is different. |
22:10:22 | Araq | damn. why? |
22:10:44 | Varriount | I need to allocate a blob of memory for Windows to use. The blob's size is determined at *runtime* |
22:11:06 | Varriount | The blob is used to store file event notices. |
22:12:17 | * | silven quit (Ping timeout: 260 seconds) |
22:13:10 | Araq | is it really a blob or do you store closures/refs/whatever in there? |
22:14:05 | Araq | unsafeNew() indeed can give you a GC'ed blob but so can newString() |
22:15:08 | Varriount | The only data stored in there are file events. These events are only referenced when I loop through the blob, and copy/convert the data into something a user-supplied callback can use. |
22:17:24 | Varriount | Araq: Here's the allocation procedure, if you're interested: https://gist.github.com/Varriount/8fcb58028e1aeccde01c |
22:18:55 | Araq | that's horrible |
22:19:05 | Araq | what alignment do you really need? |
22:19:26 | Araq | alignment of 8 is guaranteed by the allocator/GC |
22:19:29 | Varriount | http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465(v=vs.85).aspx |
22:19:42 | Varriount | A pointer to a DWORD aligned buffer |
22:20:06 | Varriount | Which is 32 bits/ |
22:20:34 | Araq | yeah, don't worry |
22:20:45 | Araq | it is aligned properly for your purposes |
22:20:54 | Varriount | Oh yay. That means I can throw out that monster. |
22:20:59 | Araq | yup |
22:21:19 | Varriount | But can I use unsafeNew/newString? |
22:21:41 | Araq | even the archaic Borland C++ allocator allocated on 32bit boundaries :-) |
22:22:04 | * | adoniscik joined #nimrod |
22:22:27 | Araq | but not necessarily on 64 bits ... this took me some time to figure out, back in the days |
22:23:25 | Araq | Varriount: unsafeNew/newString align properly too, however the question is whether you keep a pointer around in nimrod land |
22:23:40 | Varriount | Only momentarily |
22:24:05 | Araq | that's bad, but you can always GC_ref(x) / GC_unref(x) it |
22:24:19 | Varriount | True.. |
22:28:49 | Varriount | Araq: What if the blob is captured by a closure? |
22:30:02 | * | tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]) |
22:30:45 | Araq | that means the closure keeps a reference around |
22:41:44 | Varriount | And I'm still getting a dealloc error. The thing is, I now have no occurrences of dealloc in my code. |
22:43:16 | Varriount | Perhap's the asyncio code is doing it.. *looks at dom96* |
22:43:53 | Araq | sounds reasonable, but I still think it's *your* corruption/bug |
22:45:27 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
22:50:16 | dom96 | Varriount: perhaps, delete the deallocs in asyncdispatch and see what happens. |
22:50:57 | dom96 | I think it's possible the issue is somewhere else even if it starts to work after you remove the deallocs. |
22:51:13 | Araq | well the GC also calls 'dealloc', you should fire up GDB to check the stack trace |
22:52:06 | Araq | that said, a corruption has this nice property which is called "non locality" |
22:52:57 | Varriount | I've commented out all GC_unref's and dealloc's in my files and in asyncdispatch.nim, and the error still occurs. |
22:55:25 | dom96 | Try to compare your code with the socket code in asyncdispatch as much as you can. |
22:55:29 | dom96 | It might help |
22:55:34 | dom96 | I need to go to sleep now |
22:55:36 | dom96 | good night |
22:55:54 | * | q66_ joined #nimrod |
22:57:25 | * | Matthias247 quit (Quit: Matthias247) |
22:58:10 | * | q66 quit (Ping timeout: 260 seconds) |
23:05:33 | Varriount | Araq: How are the files names referenced in debug executables? Through a full path, or just the file? |
23:06:08 | Araq | just the file, but you can always press TAB to get auto complete |
23:06:17 | Varriount | I'm trying to set a breakpoint in lib/system/alloc.nim, but gdb doesn't recognize any of the paths I give it. |
23:06:31 | Araq | --lineDir:on |
23:11:05 | Varriount | Still no recognition. |
23:12:13 | * | Jehan_ quit (Quit: Leaving) |
23:16:19 | Araq | bt alloc.nim:730 |
23:16:26 | Araq | *br |
23:22:12 | * | EXetoC quit (Quit: WeeChat 0.4.3) |
23:28:08 | * | darkf joined #nimrod |
23:31:39 | NimBot | Araq/Nimrod devel 62e454f Araq [+0 ±4 -0]: asynchttpserver compiles again; made some tests green |
23:31:39 | NimBot | Araq/Nimrod devel 4d8c127 Araq [+0 ±4 -0]: made some tests green |
23:35:25 | Varriount | Araq: Yeah, that doesn't work. 'info sources' only lists some C file as available. |
23:35:55 | Araq | did you use --lineDir:on ? |
23:36:00 | Varriount | Yeah. |
23:36:22 | Varriount | "nimrod c -d:useSysAssert -d:useGcAssert --lineDir:on filemon.nim" |
23:36:41 | Araq | --debugInfo is missing |
23:37:25 | Araq | we need --debugger:none|endb|gdb instead of the --debugInfo + --lineDir:on mess |
23:39:15 | Varriount | Hm.. Interesting... |
23:40:17 | Varriount | Araq: https://gist.github.com/Varriount/36892ea3787b32d512c2 |
23:41:06 | Varriount | It's being caused by me repr()'ing a closure? |
23:41:15 | Araq | yup |
23:41:41 | Araq | well it's because your repr something |
23:42:22 | Araq | btw you can do lots of more |
23:42:41 | Araq | -d:corruption -d:fulldebug iirc also exist |
23:45:37 | Araq | system/mmdisp.nim has many more options to hunt down corruptions |
23:54:01 | Varriount | Why aren't these documented? |
23:56:27 | * | saml_ joined #nimrod |
23:58:01 | Araq | because we need a debugging tutorial |
23:58:14 | Araq | documenting the switches does not cut it |
23:59:08 | * | ARCADIVS quit (Quit: WeeChat 0.4.3) |