<< 13-12-2016 >>

00:00:16*ryanhowe quit (Quit: WeeChat 1.4)
00:00:24*nsf quit (Quit: WeeChat 1.6)
00:00:45*Matthias247 quit (Read error: Connection reset by peer)
00:04:02*ryahhowe joined #nim
00:09:38trinarybeecheatfate: you asked me for a gist a couple days ago when I was complaining of asyncdispatch blocking for the entire 500ms poll timeout on osx: https://gist.github.com/anonymous/6a6efb9cae7f5fd710744a8c6c47dae7
00:10:45trinarybeethat worked fine on linux, but has intermittent periods where it blocks on osx
00:11:54trinarybeealso: that is the first thing I've written in nim, and a crude prototype besides, so I'm sure there are a thousand things to point out about it sucking :)
00:14:59cheatfatetrinarybee, ok first of all
00:15:17cheatfateyou are using `waitFor` everywhere
00:15:23cheatfateand this is one of the problems
00:15:44cheatfateplease change every `waitFor` in procedures marked with {.async.} pragma to `await`
00:16:52trinarybeethat would explain a lot
00:21:33cheatfatein most cases you need only `waitFor` only in `MainModule` block
00:25:19trinarybeethanks much. I did not realize waitFor was blocking the entire thread. I'm actually impressed that code even ran without completely deadlocking, much less ran quickly on linux
00:26:05trinarybeeI think I somehow got it in my head that waitFor was like an await with an implied discard, if that makes any sense
00:28:14ftsfhmm if it have a const array of strings, will they always be copied shallowly? or do i need to iterate through the array and mark them all as shallow?
00:28:44Araqyou cannot have shallow const strings they lack a GC header
00:29:36ftsfhmm, I see, is there a way I can ensure they don't get copied and they're always used directly?
00:31:22AraqI wouldn't bother but if you want more control use an array of cstring
00:31:36ftsfokay
00:32:14ftsfi only ask because i'm running into memory issues with emscripten (and i can't seem to get the GC working with that) and it seems to be lots of copies of strings
00:34:11Araqah emscripten...
00:39:55*fredrik92 joined #nim
00:40:43*couven92 quit (Disconnected by services)
00:40:46*fredrik92 is now known as couven92
00:50:02*ryahhowe quit (Read error: Connection reset by peer)
00:50:44*ryahhowe joined #nim
00:57:36*vlad1777d quit (Quit: Leaving)
01:57:58*libman quit (Remote host closed the connection)
01:58:48*Snircle joined #nim
02:05:38*chemist69 quit (Ping timeout: 246 seconds)
02:18:14*ryanhowe joined #nim
02:19:23*trinarybee quit (Quit: Leaving)
02:20:03*chemist69 joined #nim
02:34:13*ryanhowe quit (Remote host closed the connection)
02:37:16*pregressive joined #nim
02:41:13*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:44:46*ryanhowe joined #nim
02:45:52*ryanhowe quit (Client Quit)
03:15:43*cheatfate_ joined #nim
03:15:46*cheatfate quit (Read error: Connection reset by peer)
03:16:37*subsetpark quit (Quit: Connection closed for inactivity)
03:17:26*kulelu88 quit (Quit: Leaving)
03:18:42*couven92 quit (Quit: Client disconnecting)
03:31:06*pregressive quit (Remote host closed the connection)
03:31:40*pregressive joined #nim
03:36:38*pregressive quit (Ping timeout: 264 seconds)
03:52:52*dddddd quit (Remote host closed the connection)
03:53:34*ryahhowe quit (Quit: Leaving)
03:58:57*pregressive joined #nim
04:06:57*chemist69 quit (Ping timeout: 260 seconds)
04:07:02*ryanhowe joined #nim
04:07:41*chemist69 joined #nim
04:07:52ryanhowe~/quit
04:07:55*ryanhowe quit (Client Quit)
04:25:34*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:11:43dyce[m]the nim GC works in emscripten?
05:29:47*pregressive quit (Remote host closed the connection)
05:30:21*pregressive joined #nim
05:34:53*pregressive quit (Ping timeout: 258 seconds)
05:47:40ftsfdyce_, does it?
06:11:50*chemist69 quit (Ping timeout: 250 seconds)
06:14:25*chemist69 joined #nim
06:28:08*nsf joined #nim
06:35:57*avsej quit (Ping timeout: 252 seconds)
06:37:29*avsej joined #nim
06:37:29*avsej quit (Changing host)
06:37:29*avsej joined #nim
07:02:42*Trustable joined #nim
07:03:01*Trustable quit (Remote host closed the connection)
07:32:19*Arrrr joined #nim
07:42:58*Varriount|Mobile joined #nim
07:43:44Varriount|Mobileftsf: Have you tried "--define:useMalloc"?
07:43:52*rokups joined #nim
07:50:41ftsfVarriount|Mobile, i haven't
07:52:25Varriount|Mobileftsf: That might work. Normally Nim uses memory maps to allocate memory (on *nix systems), so it's not surprising that emscriptem falls.
07:52:46Varriount|MobileMalloc is probably supported though.
07:52:54*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:54:11*space-wizard joined #nim
07:54:27*space-wizard quit (Client Quit)
07:54:59*space-wizard joined #nim
07:55:15*space-wizard quit (Client Quit)
07:55:50*space-wizard joined #nim
07:56:03*space-wizard quit (Client Quit)
07:56:32*space-wizard joined #nim
07:56:51*space-wizard quit (Client Quit)
07:57:21*space-wizard joined #nim
07:57:39*space-wizard quit (Client Quit)
07:58:11*space-wizard joined #nim
07:58:27*space-wizard quit (Client Quit)
07:58:55*space-wizard joined #nim
07:59:15*space-wizard quit (Client Quit)
08:03:43*mal`` quit (Quit: Leaving)
08:05:07*mal`` joined #nim
08:05:48*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
08:18:34*chemist69 quit (Ping timeout: 258 seconds)
08:21:10*chemist69 joined #nim
08:36:53FromGitter<gokr> I have a patch that never made it upstream for using malloc - for a constrained iot device.
08:37:01*FromGitter * gokr digging...
08:38:15FromGitter<gokr> Read here: https://github.com/gokr/ardunimo/blob/master/README.md
08:38:49FromGitter<gokr> There is the patch to get malloc to work, but... Dont recall if it was complete with freeing etc
08:39:18FromGitter<gokr> Bug Araq to get that supported ;)
08:54:30*Andris_zbx joined #nim
08:57:20Araqgokr: we have patchFile() for this now, no need to mess with Nim's stdlib to support that
08:58:18Araqunfortunately we don't know what -d:useMalloc means
09:15:48*yeeve quit (Remote host closed the connection)
09:20:13*kunev joined #nim
09:23:18*bjz joined #nim
09:47:13*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:02:37*bjz joined #nim
10:30:28*PMunch joined #nim
10:31:43*couven92 joined #nim
10:33:02*elrood joined #nim
11:03:30*bjz_ joined #nim
11:03:38*bjz quit (Ping timeout: 268 seconds)
11:08:16*chemist69 quit (Ping timeout: 240 seconds)
11:12:59*chemist69 joined #nim
11:14:05*Arrrr quit (Ping timeout: 246 seconds)
11:17:15*Arrrr joined #nim
11:24:39*space-wizard joined #nim
11:24:42*space-wizard quit (Client Quit)
11:34:37*zevlg joined #nim
11:55:15*Snircle joined #nim
12:16:51*Arrrr quit (Quit: WeeChat 1.5)
12:26:12*bjz_ quit (Ping timeout: 246 seconds)
12:26:21*bjz joined #nim
12:33:14*vlad1777d joined #nim
12:49:22*vlad1777d quit (Ping timeout: 250 seconds)
12:49:58*vlad1777d joined #nim
12:58:02*vlad1777d quit (Ping timeout: 250 seconds)
13:16:25*chemist69 quit (Ping timeout: 258 seconds)
13:18:49*chemist69 joined #nim
13:22:30*vlad1777d joined #nim
13:28:25SentreenPEG question: is it possible to say I want to match x occurences of <pattern>? Like in regexes you could write pattern{x}
14:02:37*Ven joined #nim
14:31:49*elrood quit (Quit: Leaving)
14:37:38AraqSentreen: interestingly, there is not.
14:38:20Araqpegs don't support it except of course to write it on your own
14:39:46Araqs <- x x x x x? x? x?
14:40:00Araqx <- [a-z]
14:40:34Araq# {4,7} occurences of a-z
14:44:01*terry[m] left #nim ("User left")
14:48:07*vlad1777d_ joined #nim
14:49:11*vlad1777d quit (Ping timeout: 258 seconds)
14:55:10*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
15:02:45*vlad1777d_ quit (Quit: Leaving)
15:04:43*vlad1777d joined #nim
15:08:53FromGitter<andreaferretti> I'm trying to figure out what is going on with incorrect type inference for generic parameters
15:09:09FromGitter<andreaferretti> Something that used to work in 0.14.2 but is broken in 0.15
15:09:38FromGitter<andreaferretti> do you have any suggestion where to start looking in the compiler?
15:09:52FromGitter<andreaferretti> a minimal example that I was able to figure out is
15:10:02FromGitter<andreaferretti> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58500f4abe9d43bc635600c0]
15:10:31Araqsemtypinst
15:10:37Araqand sigmatch.nim
15:10:42FromGitter<andreaferretti> ok, great!
15:11:28Araqmost likely 'git log -p compiler/semtypinst.nim' will lead to insights
15:11:42FromGitter<andreaferretti> thank you a lot! :-)
15:11:55*rokups quit (Quit: Connection closed for inactivity)
15:12:03FromGitter<andreaferretti> (in the above example `A` is inferred to be `string` and `R` to be `seq[int]`, while actually `A = int` and `R = string`)
15:13:58Araqyes I read your bug report
15:14:20FromGitter<andreaferretti> Yeah, I was trying to start debugging myself to see if I could help
15:15:17Araqactually sigmatch.nim has more changes
15:19:13*Jesin joined #nim
15:23:08Araqoh and switch to the sighashes branch of the compiler first please
15:23:30AraqI want to merge it into devel and like to know whether your stuff works with it
15:23:58FromGitter<andreaferretti> ah ok, nice to know!
15:24:45FromGitter<andreaferretti> well, still seeing the same issue
15:25:15FromGitter<andreaferretti> but I will start from this branch to avoid conflicting with the incoming changes
15:27:15Araqthe branch is in much better shape to fix these things thanks to the new typeInst field
15:27:48AraqI think I know what causes this regression -.-
15:48:24*yeeve joined #nim
15:51:58*couven92 quit (Quit: Client disconnecting)
15:56:11*pregressive joined #nim
15:57:50*pregressive quit (Client Quit)
15:58:26*deech joined #nim
15:58:35*pregressive joined #nim
16:06:14*Varriount|Mobile joined #nim
16:09:06*Jesin quit (Quit: Leaving)
16:11:00*vlad1777d_ joined #nim
16:12:38*vlad1777d quit (Ping timeout: 264 seconds)
16:13:28*arnetheduck quit (Ping timeout: 250 seconds)
16:14:44chemist69can I specify a location where to put the documentation generated by `nim doc`?
16:15:21Varriount|MobileAraq: For the stack garbage collector, how would you move an object from one region to another without copying?
16:19:27Araqchemist69: --out ?
16:21:31chemist69Araq: thanks. I made a stupid mistake and tried `-o doc/xxx.html` instead of `-o:doc/xxx.html`
16:21:39*vlad1777d__ joined #nim
16:23:00*vlad1777d_ quit (Ping timeout: 250 seconds)
16:25:54AraqVarriount|Mobile: you can't but it's not clear whether that means anything.
16:26:41Araqa copying collector works this way too. and the tradeoff is always bulk op vs lots of tiny fragmented ops
16:27:10Araqyou can copy 10 GB per second in RAM
16:28:30*subsetpark joined #nim
16:28:31Araqand every cache miss implies a copy from RAM into the caches
16:32:06FromGitter<andreaferretti> btw, about gc:stack
16:32:13FromGitter<andreaferretti> how does it work anyway?
16:32:28FromGitter<andreaferretti> at a very high level
16:32:33*Sentreen quit (Ping timeout: 245 seconds)
16:32:51FromGitter<andreaferretti> is there some info anywhere?
16:34:10AraqwithRegion r: ... # your code here
16:34:29Araqwhere r: MemRegion
16:35:32Araqthe only problem is that it doesn't even work with resizable datastructures
16:36:07Araqsupporting these would bring back all the complexity of a general purpose memory manager
16:36:25Araqvar s = newSeq(30)
16:36:33AraqwithRegion r:
16:36:35Araq ...
16:36:55Araq s.add(...) # oops, realloc uses the inner memory region
16:37:01Araq ...
16:37:40flyxbut this wouldn't be a problem if s was declared inside withRegion, would it?
16:38:08Araqno, but few realistic programs have no outer scope tables or seqs
16:38:46flyxwould it be possible to make that a compiler error?
16:39:21Araqthat's futile but internally the 'realloc' could look at from which region the seq came from and use that
16:39:50Araqhmm yeah, somebody should do this :-)
16:39:56Araqthen it's actaully useful
16:40:24Araqeven though it cannot easily re-use the memory that is freed in the resize operation
16:42:31*Andris_zbx quit (Remote host closed the connection)
16:43:15FromGitter<andreaferretti> uhm
16:43:30FromGitter<andreaferretti> but what happens to memory that escapes the scope?
16:44:17FromGitter<andreaferretti> I mean, can one return structures from functions and so on
16:45:31FromGitter<andreaferretti> also, since regions are actual values of type MemRegion
16:45:44FromGitter<andreaferretti> can one pass them around, return them...
16:46:02*Sentreen joined #nim
16:46:36FromGitter<andreaferretti> I had seen the snippet on how to use them, but I guess I am not sure what they actually are
16:51:00*pregressive quit (Read error: Connection reset by peer)
16:51:29*pregressive joined #nim
16:52:45*couven92 joined #nim
17:15:16*derlafff quit (Ping timeout: 250 seconds)
17:16:24*derlafff joined #nim
17:16:34FromGitter<andreaferretti> I was not able to figure out much in semtypinst.nim or sigmatch.nim :-(
17:16:39FromGitter<andreaferretti> I will try next days
17:20:43*Trustable joined #nim
17:21:20*vlad1777d_ joined #nim
17:22:31*vlad1777d__ quit (Ping timeout: 258 seconds)
17:33:56*vlad1777d__ joined #nim
17:35:10*vlad1777d_ quit (Ping timeout: 258 seconds)
17:39:16*Varriount|Mobile quit (Read error: Connection reset by peer)
17:39:23*Varriount|Phone joined #nim
17:40:59*k1io joined #nim
17:41:00*Varriount|Phone quit (Read error: Connection reset by peer)
17:46:01*Varriount|Phone joined #nim
17:48:53*Varriount|Phone quit (Read error: Connection reset by peer)
17:51:13*libman joined #nim
17:54:09*Varriount|Phone joined #nim
17:54:58*Varriount|Phone quit (Read error: Connection reset by peer)
17:55:04*Varriount joined #nim
17:56:26*space-wizard joined #nim
17:59:14VarriountAraq: Personally I think manual memory management is overrated.
17:59:56VarriountEven C++ programmers use a form of automatic memory management through smart pointers
18:00:05*shodan45 joined #nim
18:06:15*jjido joined #nim
18:16:54*Varriount quit (Read error: Connection reset by peer)
18:19:22*deech quit (Remote host closed the connection)
18:21:06*jjido quit (Read error: Connection reset by peer)
18:44:13*Sentreen quit (Ping timeout: 245 seconds)
18:47:11Calinouonly in C++11/14, no?
18:47:40flyxwell they were available in boost before
18:55:59*vlad1777d_ joined #nim
18:57:38*Sentreen joined #nim
18:57:42*vlad1777d__ quit (Ping timeout: 250 seconds)
19:09:35*shodan45 quit (Ping timeout: 265 seconds)
19:30:31*vlad1777d_ quit (Read error: Connection reset by peer)
19:32:08*dddddd joined #nim
19:32:53*vlad1777d_ joined #nim
19:41:54*shodan45 joined #nim
19:45:02*joshbaptise joined #nim
19:45:26*joshbaptise quit (Client Quit)
19:49:43*fredrik92 joined #nim
19:50:34*fredrik92 quit (Read error: Connection reset by peer)
19:51:00*fredrik92 joined #nim
19:54:21*joshbaptise joined #nim
19:54:39*joshbaptise quit (Client Quit)
19:55:57*joshbaptiste joined #nim
20:34:45*vlad1777d__ joined #nim
20:35:19*vlad1777d_ quit (Ping timeout: 258 seconds)
20:46:46*k1io quit (Quit: Connection closed for inactivity)
21:12:44*Jesin joined #nim
21:15:09*freddy92 joined #nim
21:15:09*vlad1777d_ joined #nim
21:15:59*fredrik92 quit (Ping timeout: 268 seconds)
21:16:21*vlad1777d__ quit (Ping timeout: 258 seconds)
21:16:54*fredrik92 joined #nim
21:19:47*freddy92 quit (Ping timeout: 258 seconds)
21:22:05*fredrik92 quit (Ping timeout: 258 seconds)
21:26:26*Sentreen quit (Ping timeout: 264 seconds)
21:28:16*ftsf quit (Ping timeout: 240 seconds)
21:33:02*ftsf joined #nim
21:35:20*chemist69 quit (Ping timeout: 246 seconds)
21:38:04*chemist69 joined #nim
21:39:02*Sentreen joined #nim
21:42:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:58:48*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:59:03*Ven joined #nim
21:59:55*Sembei joined #nim
22:02:29*bjz joined #nim
22:16:29*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:34:00*nsf quit (Quit: WeeChat 1.6)
22:47:50*Jesin quit (Quit: Leaving)
22:53:23*Sentreen quit (Quit: WeeChat 1.4)
22:58:13*Sentreen joined #nim
22:58:53*Trustable quit (Remote host closed the connection)
23:10:57*PMunch quit (Quit: leaving)
23:42:02*chemist69 quit (Ping timeout: 246 seconds)
23:42:25*Jesin joined #nim
23:45:00*Jesin quit (Remote host closed the connection)
23:46:52*chemist69 joined #nim
23:59:52*arnetheduck joined #nim