00:22:50 | * | irrequietus quit () |
00:31:36 | * | yglukhov joined #nim |
00:35:50 | * | xet7 joined #nim |
00:37:00 | * | yglukhov quit (Ping timeout: 272 seconds) |
00:50:13 | * | akaisora_ joined #nim |
00:50:47 | * | akaisora_ quit (Remote host closed the connection) |
00:58:51 | * | fredrik92 quit (Quit: Shutting down...) |
01:29:40 | * | chemist69 quit (Ping timeout: 250 seconds) |
01:34:43 | * | brson quit (Quit: leaving) |
01:43:47 | * | chemist69 joined #nim |
01:47:58 | * | Demon_Fox joined #nim |
02:02:42 | * | fastrom1 joined #nim |
02:02:42 | * | fastrom quit (Read error: Connection reset by peer) |
02:10:15 | * | Demon_Fox quit (Read error: Connection reset by peer) |
02:10:41 | * | Demon_Fox joined #nim |
02:33:44 | * | yglukhov joined #nim |
02:37:51 | * | yglukhov quit (Ping timeout: 240 seconds) |
02:56:10 | * | fastrom1 quit (Quit: Leaving.) |
04:31:14 | * | ozra quit (Ping timeout: 250 seconds) |
04:31:22 | * | ozra__ quit (Ping timeout: 252 seconds) |
04:35:01 | * | desophos joined #nim |
04:35:35 | * | yglukhov joined #nim |
04:40:32 | * | yglukhov quit (Ping timeout: 260 seconds) |
05:02:15 | * | endragor joined #nim |
05:05:25 | * | endragor quit (Remote host closed the connection) |
05:20:15 | * | endragor joined #nim |
05:20:21 | * | ozra joined #nim |
05:20:24 | * | ozra__ joined #nim |
05:56:18 | * | akamaus joined #nim |
06:22:59 | * | endragor_ joined #nim |
06:26:29 | * | chemist69 quit (Quit: WeeChat 1.5) |
06:26:51 | * | endragor quit (Ping timeout: 264 seconds) |
06:37:47 | * | yglukhov joined #nim |
06:38:42 | * | endragor_ quit (Remote host closed the connection) |
06:39:11 | * | endragor joined #nim |
06:42:06 | * | yglukhov quit (Ping timeout: 246 seconds) |
06:50:57 | * | Trustable joined #nim |
06:54:59 | * | yglukhov joined #nim |
06:59:19 | * | yglukhov quit (Ping timeout: 252 seconds) |
07:01:17 | * | brechtm joined #nim |
07:01:18 | * | ozra__ quit (Quit: Ex-Chat) |
07:01:41 | cheatfate | dom96, under linux or bsd you can control environment (background processes, cron'ed applications), but on windows or macos, you can always get some heavy task spawned while you testing... and you even dont know about it |
07:05:51 | * | brechtm quit (Ping timeout: 264 seconds) |
07:06:28 | * | akamaus quit (Ping timeout: 252 seconds) |
07:07:44 | * | chemist69 joined #nim |
07:12:35 | * | brechtm joined #nim |
07:34:06 | * | arnetheduck_ joined #nim |
07:34:06 | * | arnetheduck quit (Read error: Connection reset by peer) |
07:44:03 | * | heinrich5991 quit (Ping timeout: 240 seconds) |
07:46:34 | * | fastrom joined #nim |
07:50:56 | * | euantor joined #nim |
08:04:45 | * | heinrich5991 joined #nim |
08:09:00 | * | zodiak_ joined #nim |
08:12:36 | * | zodiak quit (Ping timeout: 276 seconds) |
08:16:22 | * | Demon_Fox quit (Ping timeout: 260 seconds) |
08:18:32 | * | Demon_Fox joined #nim |
08:25:14 | * | GangstaCat joined #nim |
08:34:57 | * | GangstaCat quit (Quit: Leaving) |
08:38:00 | * | elrood joined #nim |
08:43:31 | * | brechtm quit (Read error: Connection reset by peer) |
08:43:37 | * | brechtm_ joined #nim |
08:43:56 | * | yglukhov joined #nim |
08:46:42 | * | fastrom quit (Quit: Leaving.) |
09:02:07 | * | pafmaf joined #nim |
09:20:11 | * | brechtm_ quit (Read error: Connection reset by peer) |
09:20:34 | * | brechtm joined #nim |
09:25:24 | * | Sembei quit (Ping timeout: 276 seconds) |
09:45:05 | * | nsf quit (Quit: WeeChat 1.5) |
09:50:48 | * | Demon_Fox quit (Quit: Leaving) |
10:00:34 | * | endragor quit (Read error: Connection reset by peer) |
10:01:50 | * | ephja joined #nim |
10:13:26 | * | Jesin quit (Ping timeout: 258 seconds) |
10:14:56 | * | endragor joined #nim |
10:19:33 | * | ephja quit (Ping timeout: 240 seconds) |
10:21:34 | * | TheLemonMan joined #nim |
10:27:12 | chemist69 | Hi, I want to use the ordinal value of an enum. From the tutorial I understood that `ord` would give me that and also the documentation states that `ord` returns an int (http://nim-lang.org/docs/system.html#ord,T). But in my example (https://glot.io/snippets/egcpoz8qqf), it seems to return a `range 0..3(int)`. What am I doing wrong? |
10:29:38 | * | ndh joined #nim |
10:30:48 | ndh | hello. where in the manual can i find out about "with" being a keyword. it's a bit hard to google. :/ |
10:30:50 | flyx | chemist69: I don't think you're doing anything wrong, that's just the way it is |
10:31:03 | * | brechtm quit (Ping timeout: 264 seconds) |
10:31:27 | chemist69 | but shouldn't it ne an int? |
10:31:38 | chemist69 | *be |
10:33:04 | flyx | well I guess the documentation is just too general here. it makes sense that ord of some enum is a range type. similarly, a set of an enum type is a lot smaller than set[int] (if that would even be allowed) |
10:36:36 | flyx | ndh: I think `with` is just a reserved word and currently does not do anything |
10:39:16 | chemist69 | flyx: I see, thanks for explaining. |
10:46:33 | ndh | flyx: alright, thanks :) |
11:23:46 | euantor | chemist69: using `echo $unit.ord` prints "`" |
11:24:39 | euantor | And doing `let intUnit: int = ord(unit)` also works, so `ord` is returning an int |
11:25:09 | euantor | http://nim-lang.org/docs/system.html#ord,T |
11:25:09 | flyx | euantor: that's because the range type is implicitly convertible to int |
11:25:32 | euantor | Hm. THe docs specifically say it returns an int, so it's pretty odd |
11:28:09 | flyx | well, it's magic |
11:29:00 | euantor | True, just seems a little odd to me |
11:29:01 | flyx | there are multiple other occations where the given return type is not the actual return type because of magic |
11:29:30 | euantor | Yeah, those cases should really be documented though IMO |
11:29:50 | flyx | agreed |
11:36:28 | * | freezerburnv joined #nim |
12:01:44 | * | desophos quit (Read error: Connection reset by peer) |
12:08:36 | * | fredrik92 joined #nim |
12:41:50 | ndh | with `sourceGroups: Table[string, seq[string]]` i'm using `var sourceGroup = sourceGroups.mgetOrPut(directory, @[])` then `for path in paths: sourceGroup.add(path)` to add to the sequence, but sourceGroups itself is not modified. am i not allowed to modify sourceGroup in place? |
12:45:29 | * | kulelu88 joined #nim |
12:47:03 | * | freezerburnv quit (Ping timeout: 240 seconds) |
12:50:48 | Araq | ndh: use 'mitems' |
12:51:23 | endragor | ndh: `var foo = bar` always copies value of `bar` into `foo`. when a proc returns `var`, you can only modify return value within the same expression, for example: `sourceGroups.mgetOrPut(directory, @[]).add(paths)` |
12:55:34 | ndh | ok, that explains it. can i use a reference for this? |
12:56:06 | ndh | i didn't understand how i would use `mitems` here. |
12:56:46 | ndh | or can i rely on the compiler not to perform the mgetOrPut lookup multiple times? |
12:58:15 | ndh | other possibility: is there a canonical proc that adds an array to a sequence? |
12:58:33 | endragor | ndh: yes, `add`. The example I've shown should work for you |
12:59:08 | ndh | oh. yea it does, thanks |
12:59:15 | * | fredrik92 quit (Quit: Shutting down...) |
13:05:29 | * | edub4rt joined #nim |
13:28:26 | * | PMunch joined #nim |
13:28:34 | yglukhov | Araq: could you please give me a hint? I've added a field `shouldBeFreed` to `PCell`, I'm setting it to true on my object where i think it should be freed. I'm expecting `markS` to hit such a cell and then do smth about it. But `markS` doesn't hit this cell. Is `markS` the wrong place for it? |
13:28:43 | * | edub4rt quit (Ping timeout: 252 seconds) |
13:28:59 | yglukhov | thats gc.nim i'm messing with |
13:29:52 | Araq | adding fields to PCell sounds dangerous |
13:30:02 | * | Cidinho joined #nim |
13:30:03 | * | ozra quit (Ping timeout: 240 seconds) |
13:30:13 | * | Cidinho left #nim (#nim) |
13:30:23 | Araq | are you sure you did that correctly? all sorts of things depends on PCell's layout and that it's 8/16 bytes |
13:31:03 | yglukhov | well, nothing crashes... and thats not a hello-world app. |
13:31:07 | Araq | better use an unused color instead |
13:31:53 | yglukhov | but is it correct to expect markS called on every alive cell? |
13:34:29 | yglukhov | Araq |
13:36:20 | PMunch | Oh hi yglukhov, do you know where this function went in the wrapper: https://wiki.libsdl.org/SDL_IntersectRect ? |
13:37:02 | yglukhov | PMunch: no idea. have you checked /dev/null? =) |
13:39:31 | PMunch | Haha :P |
13:40:01 | PMunch | I was just wondering if there was any idea behind it not being included. |
13:40:10 | * | edub4rt joined #nim |
13:41:04 | PMunch | Makes it a bit annoying to work with the SDL stuff as some of the functions are gone.. Is there some auto-generated docs for the sdl wrapper around by the way? I see the source is full of notations. |
13:42:46 | Araq | yglukhov: dunno, looks like it. |
13:50:00 | * | BitPuffin|osx joined #nim |
13:50:21 | * | itnex joined #nim |
14:01:16 | ndh | Araq: is there a way to find out the absolute path of the translation unit (currently compiled .nim file) |
14:06:07 | kier_ | ndh: http://nim-lang.org/docs/system.html#currentSourcePath.t, |
14:10:58 | * | PMunch quit (Quit: leaving) |
14:11:24 | * | filcuc joined #nim |
14:11:37 | filcuc | what's wrong with http://pastebin.com/5b1Eukgq |
14:11:54 | yglukhov | Araq: i'm observing some strange behavior with gc. i changed my experiment in such a way that i store PCell i want to debug globally. So no extra fields in PCell. i'm doing GC_fullCollect every second. Now i don't hit my cell in markS, nor in collectZCT. the finalizer never gets called. However. I'm hitting this cell a couple of times in gcMark during the FIRST collection. Subsequent collections are silent about it. |
14:12:00 | filcuc | 'spawn' takes a GC safe call expression |
14:12:22 | * | PMunch joined #nim |
14:16:37 | * | wuehlmaus joined #nim |
14:21:06 | ndh | kier_: thanks |
14:27:14 | * | brson joined #nim |
14:28:50 | filcuc | no can point out how to further understand the span takes a GC safe call expression? |
14:35:50 | dom96 | filcuc: getContent isn't gc safe IIRC |
14:35:56 | dom96 | because it accesses a global var |
14:36:22 | dom96 | why are you putting it in a different thread? |
14:39:22 | filcuc | i'm just playing with spawn and i wanted to do a slow operation on a thread |
14:39:41 | filcuc | dom96: and the first thing i thought was to download a page or something over http |
14:40:52 | * | euantor quit (Quit: Leaving) |
14:43:48 | filcuc | dom96: seems quite a natural thing to do.. |
14:50:54 | filcuc | is there an alternative? |
14:52:02 | * | fvs joined #nim |
14:52:12 | dom96 | We need to fix it so that it is GC safe |
14:53:24 | dom96 | this compiles https://gist.github.com/dom96/52cc744b513c80b3d499a8dd36ba155b |
14:54:35 | filcuc | dom96: i can confirm it |
14:54:43 | filcuc | dom96: works here thanks |
14:56:30 | fvs | hi, working on a simple posix callback timer. Code here: http://pastebin.com/B3WQ8zMy. The timer_setimer func requires 2 Itimerspec parameters. Howto set the second Itimerspec parameter to NULL in timer_settime func?. |
15:05:07 | Araq | modify the wrapper so that it also accepts a 'ptr' instead |
15:05:55 | yglukhov | Araq: should every cell reside in zct at all times? |
15:06:03 | * | endragor quit (Ping timeout: 250 seconds) |
15:06:16 | Araq | nah that would be horrible |
15:06:29 | Araq | zct = zero count table, aka the cells we think have rc == 0 |
15:14:59 | * | euantor joined #nim |
15:24:48 | * | rgv151 joined #nim |
15:25:06 | * | rgv151 left #nim (#nim) |
15:25:14 | * | rgv151 joined #nim |
15:27:20 | * | filcuc quit (Quit: Konversation terminated!) |
15:38:51 | * | rgv151 quit (Ping timeout: 240 seconds) |
15:39:40 | * | euantor quit (Remote host closed the connection) |
15:42:42 | * | euantor joined #nim |
15:43:04 | yglukhov | Araq: is there a way to enumerate all cells? is it zct + decStack + tempStack? |
15:44:44 | Araq | the sweep phase does that. |
15:44:49 | * | fvs left #nim ("ERC (IRC client for Emacs 24.5.1)") |
15:49:40 | dom96 | Araq: should macros use typed/untyped instead of stmt/expr now too? |
15:49:50 | Araq | yes |
15:49:54 | dom96 | ok cool |
15:50:03 | dom96 | Might want to update the manual ;) |
16:20:41 | * | Trustable quit (Remote host closed the connection) |
16:22:35 | * | euantor quit (Remote host closed the connection) |
16:37:43 | * | _stowa joined #nim |
16:41:39 | * | euantor joined #nim |
16:46:01 | * | _stowa quit (K-Lined) |
16:49:52 | * | Sembei joined #nim |
16:51:51 | ndh | is there no overload for safeAdd for this? `Error: type mismatch: got (seq[string], Array constructor[0..2, string])` |
17:00:01 | * | euantor quit (Remote host closed the connection) |
17:00:17 | * | nsf joined #nim |
17:21:48 | * | euantor joined #nim |
17:29:27 | * | zodiak joined #nim |
17:31:16 | * | zodiak_ quit (Ping timeout: 252 seconds) |
17:35:11 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:52:19 | * | itnex left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
17:55:58 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
18:09:27 | * | pafmaf quit (Ping timeout: 264 seconds) |
18:15:37 | * | yglukhov joined #nim |
18:19:09 | * | Demon_Fox joined #nim |
18:20:22 | * | yglukhov quit (Ping timeout: 272 seconds) |
18:29:31 | * | nsf quit (Quit: WeeChat 1.5) |
18:48:56 | * | euantor quit (Remote host closed the connection) |
18:50:53 | * | yglukhov joined #nim |
18:53:24 | * | ndh quit (Ping timeout: 250 seconds) |
19:27:27 | * | brson quit (Quit: leaving) |
19:54:02 | * | jefuss joined #nim |
19:58:39 | * | chemist69 quit (Ping timeout: 264 seconds) |
20:03:03 | * | nsf joined #nim |
20:06:23 | * | fredrik92 joined #nim |
20:15:49 | * | chemist69 joined #nim |
20:24:35 | * | zaquest quit (Read error: Connection reset by peer) |
20:26:13 | * | zaquest joined #nim |
20:36:41 | yglukhov | Araq: i've enabled gcLog and now i crash in writeCell because filename of a cell is invalid. do you know possible reason? |
20:37:06 | yglukhov | linenumber is also garbage |
20:44:04 | * | yglukhov quit (Remote host closed the connection) |
21:04:10 | * | acidx quit (Remote host closed the connection) |
21:09:19 | * | brson joined #nim |
21:11:34 | * | yglukhov joined #nim |
21:14:26 | * | Trustable joined #nim |
21:25:55 | * | elrood quit (Quit: Leaving) |
21:30:58 | * | Trustable quit (Remote host closed the connection) |
21:42:44 | * | freezerburnv joined #nim |
21:44:27 | * | jefuss quit (Read error: Connection reset by peer) |
21:46:29 | * | acidx joined #nim |
21:55:14 | * | irrequietus joined #nim |
21:56:15 | Araq | yglukhov: sorry, no idea. |
21:57:01 | * | saml quit (Quit: Leaving) |
21:57:41 | yglukhov | Araq: np, just found the problem. filename is not always initialized in `when leakDetector` |
21:58:20 | Araq | still hunting a leak? |
21:58:55 | yglukhov | yup |
21:59:53 | * | freezerburnv quit (Ping timeout: 250 seconds) |
22:00:19 | yglukhov | well not that i'm really after this particular leak. just want to learn to find such things easily. |
22:01:33 | yglukhov | because sometimes they happen, and wasting even an hour, commenting chunks of code here and there is not really productive... |
22:39:08 | * | irrequietus quit () |
22:40:51 | Araq | yglukhov: I don't get bug #4065 |
22:41:07 | Araq | the 'xor' op does produce the same result |
22:41:18 | Araq | on both mac 64 bit and win32 |
22:41:59 | yglukhov | in compile time? |
22:42:09 | yglukhov | i mean, in the vm? |
22:44:13 | * | BlaXpirit quit (Quit: Bye) |
22:44:37 | * | BlaXpirit joined #nim |
22:53:35 | * | PMunch quit (Quit: leaving) |
22:56:27 | Araq | the doAssert doesn't fail, yes |
23:07:56 | * | zodiak quit () |
23:09:31 | * | zodiak joined #nim |
23:11:23 | * | zodiak_ joined #nim |
23:13:40 | * | pregressive quit () |
23:14:59 | yglukhov | Araq: what about js? |
23:15:20 | Araq | dunno, but I thought it's a VM bug |
23:15:27 | * | zodiak quit (Ping timeout: 264 seconds) |
23:15:56 | yglukhov | it is. narrowing bug to be specific |
23:16:40 | yglukhov | narrowing negative int to 32bit while compiler is 64bit is incorrect |
23:17:43 | yglukhov | does that make sense? |
23:19:36 | Araq | how come it works for me? |
23:21:01 | yglukhov | maybe your compiler architecture matches target architecture? |
23:21:47 | yglukhov | if you're on mac64, try --cpu:i386 or js |
23:26:41 | yglukhov | good night |
23:26:45 | Araq | bye |
23:26:50 | * | yglukhov quit (Remote host closed the connection) |
23:49:45 | * | brson quit (Quit: leaving) |
23:50:22 | * | brson joined #nim |
23:57:10 | * | fredrik92 quit (Quit: Shutting down...) |
23:57:16 | * | kulelu88 quit (Quit: Leaving) |