<< 08-07-2016 >>

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:41cheatfatedom96, 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:12chemist69Hi, 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:48ndhhello. where in the manual can i find out about "with" being a keyword. it's a bit hard to google. :/
10:30:50flyxchemist69: 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:27chemist69but shouldn't it ne an int?
10:31:38chemist69*be
10:33:04flyxwell 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:36flyxndh: I think `with` is just a reserved word and currently does not do anything
10:39:16chemist69flyx: I see, thanks for explaining.
10:46:33ndhflyx: alright, thanks :)
11:23:46euantorchemist69: using `echo $unit.ord` prints "`"
11:24:39euantorAnd doing `let intUnit: int = ord(unit)` also works, so `ord` is returning an int
11:25:09euantorhttp://nim-lang.org/docs/system.html#ord,T
11:25:09flyxeuantor: that's because the range type is implicitly convertible to int
11:25:32euantorHm. THe docs specifically say it returns an int, so it's pretty odd
11:28:09flyxwell, it's magic
11:29:00euantorTrue, just seems a little odd to me
11:29:01flyxthere are multiple other occations where the given return type is not the actual return type because of magic
11:29:30euantorYeah, those cases should really be documented though IMO
11:29:50flyxagreed
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:50ndhwith `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:48Araqndh: use 'mitems'
12:51:23endragorndh: `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:34ndhok, that explains it. can i use a reference for this?
12:56:06ndhi didn't understand how i would use `mitems` here.
12:56:46ndhor can i rely on the compiler not to perform the mgetOrPut lookup multiple times?
12:58:15ndhother possibility: is there a canonical proc that adds an array to a sequence?
12:58:33endragorndh: yes, `add`. The example I've shown should work for you
12:59:08ndhoh. 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:34yglukhovAraq: 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:59yglukhovthats gc.nim i'm messing with
13:29:52Araqadding 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:23Araqare you sure you did that correctly? all sorts of things depends on PCell's layout and that it's 8/16 bytes
13:31:03yglukhovwell, nothing crashes... and thats not a hello-world app.
13:31:07Araqbetter use an unused color instead
13:31:53yglukhovbut is it correct to expect markS called on every alive cell?
13:34:29yglukhovAraq
13:36:20PMunchOh hi yglukhov, do you know where this function went in the wrapper: https://wiki.libsdl.org/SDL_IntersectRect ?
13:37:02yglukhovPMunch: no idea. have you checked /dev/null? =)
13:39:31PMunchHaha :P
13:40:01PMunchI was just wondering if there was any idea behind it not being included.
13:40:10*edub4rt joined #nim
13:41:04PMunchMakes 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:46Araqyglukhov: dunno, looks like it.
13:50:00*BitPuffin|osx joined #nim
13:50:21*itnex joined #nim
14:01:16ndhAraq: is there a way to find out the absolute path of the translation unit (currently compiled .nim file)
14:06:07kier_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:37filcucwhat's wrong with http://pastebin.com/5b1Eukgq
14:11:54yglukhovAraq: 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:00filcuc'spawn' takes a GC safe call expression
14:12:22*PMunch joined #nim
14:16:37*wuehlmaus joined #nim
14:21:06ndhkier_: thanks
14:27:14*brson joined #nim
14:28:50filcucno can point out how to further understand the span takes a GC safe call expression?
14:35:50dom96filcuc: getContent isn't gc safe IIRC
14:35:56dom96because it accesses a global var
14:36:22dom96why are you putting it in a different thread?
14:39:22filcuci'm just playing with spawn and i wanted to do a slow operation on a thread
14:39:41filcucdom96: and the first thing i thought was to download a page or something over http
14:40:52*euantor quit (Quit: Leaving)
14:43:48filcucdom96: seems quite a natural thing to do..
14:50:54filcucis there an alternative?
14:52:02*fvs joined #nim
14:52:12dom96We need to fix it so that it is GC safe
14:53:24dom96this compiles https://gist.github.com/dom96/52cc744b513c80b3d499a8dd36ba155b
14:54:35filcucdom96: i can confirm it
14:54:43filcucdom96: works here thanks
14:56:30fvshi, 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:07Araqmodify the wrapper so that it also accepts a 'ptr' instead
15:05:55yglukhovAraq: should every cell reside in zct at all times?
15:06:03*endragor quit (Ping timeout: 250 seconds)
15:06:16Araqnah that would be horrible
15:06:29Araqzct = 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:04yglukhovAraq: is there a way to enumerate all cells? is it zct + decStack + tempStack?
15:44:44Araqthe sweep phase does that.
15:44:49*fvs left #nim ("ERC (IRC client for Emacs 24.5.1)")
15:49:40dom96Araq: should macros use typed/untyped instead of stmt/expr now too?
15:49:50Araqyes
15:49:54dom96ok cool
15:50:03dom96Might 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:51ndhis 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:41yglukhovAraq: i've enabled gcLog and now i crash in writeCell because filename of a cell is invalid. do you know possible reason?
20:37:06yglukhovlinenumber 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:15Araqyglukhov: sorry, no idea.
21:57:01*saml quit (Quit: Leaving)
21:57:41yglukhovAraq: np, just found the problem. filename is not always initialized in `when leakDetector`
21:58:20Araqstill hunting a leak?
21:58:55yglukhovyup
21:59:53*freezerburnv quit (Ping timeout: 250 seconds)
22:00:19yglukhovwell not that i'm really after this particular leak. just want to learn to find such things easily.
22:01:33yglukhovbecause 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:51Araqyglukhov: I don't get bug #4065
22:41:07Araqthe 'xor' op does produce the same result
22:41:18Araqon both mac 64 bit and win32
22:41:59yglukhovin compile time?
22:42:09yglukhovi 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:27Araqthe 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:59yglukhovAraq: what about js?
23:15:20Araqdunno, but I thought it's a VM bug
23:15:27*zodiak quit (Ping timeout: 264 seconds)
23:15:56yglukhovit is. narrowing bug to be specific
23:16:40yglukhovnarrowing negative int to 32bit while compiler is 64bit is incorrect
23:17:43yglukhovdoes that make sense?
23:19:36Araqhow come it works for me?
23:21:01yglukhovmaybe your compiler architecture matches target architecture?
23:21:47yglukhovif you're on mac64, try --cpu:i386 or js
23:26:41yglukhovgood night
23:26:45Araqbye
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)