<<22-01-2013>>

00:52:24NimBotnimrod-code/Aporia ab6539e Dominik Picheta [+0 ±2 -0]: Language comment syntax is now updated when changing syntax highlighting... 2 more lines
00:52:24NimBotnimrod-code/Aporia 432b07d Dominik Picheta [+0 ±2 -0]: Hidden language definitions are now respected as being hidden.
00:52:24NimBotnimrod-code/Aporia f0910d0 Dominik Picheta [+0 ±2 -0]: Better user feedback when trying to Comment lines when no comment... 2 more lines
00:52:24NimBotnimrod-code/Aporia 8b0ee78 Dominik Picheta [+0 ±2 -0]: Opening files through the Recently opened files menu now adds the open... 2 more lines
01:40:39*q66 quit (Quit: Quit)
06:47:38*XAMPP_8 quit (Ping timeout: 245 seconds)
08:51:09*fowl joined #nimrod
11:44:30*Araq_ joined #nimrod
11:56:46*Araq_ quit (Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232])
12:14:47NimBotnimrod-code/Aporia 2c9db51 Dominik Picheta [+0 ±2 -0]: Fixed some Windows calling convention issues.
12:53:30*q66 joined #nimrod
14:43:56*XAMPP-8 joined #nimrod
15:11:02*XAMPP-8 quit (Quit: Leaving)
16:49:55*gradha joined #nimrod
16:50:58gradhagiven "var t1 = "Hello"; var t2 : pointer = addr(t1)" how do I dereference t2 back into a string?
16:57:29dom96cast[ptr string](t2)[]
17:06:10gradhait's interesting that echo repr(addr(var)) doesn't output the same thing as assigning the addr to a variable and repr'ing the variable
17:06:37gradhain the first case it shows an arrow and the value the address is pointing to, in the second only the address
17:07:49gradhais it because addr doesn't return a pointer type, but whatever it returns can be assigned to a var of pointer type?
17:10:11gradhaso doing the cast for repr works, so pointer is a generic address and "ptr type" is a pointer to a certain type and repr can extend the information then
17:21:07gradhazahary1 or zahary_: if you use the JumpToDef() inside vim and this action would open a file which you have opened in another vim instance, the editor seems to hang, but really it is waiting for you to say if you are ok with opening the file in read only mode
17:21:46gradhazahary1 or zahary_: pressing enter open the file in read only mode, do you know if JumpToDef() could be made to open the file always in read only mode instead of asking?
18:07:40*FreeArtMan joined #nimrod
18:52:27Araqgradha: indeed 'repr' uses only the information available at compile-time
18:52:40Araqperhaps it supports inheritance, I dunno ;-)
19:17:36gradhaif there is a proc using a generic, is it ok if I specify the generic in the call? say myProc[string]()
19:56:51*FreeArtMan quit (Quit: Leaving)
20:41:35reactormonkwhat's the syntax again for defining procs inline?
20:41:42reactormonk http://sprunge.us/eIXX
20:45:53gradhashouldn't it be "proc() =" since it doesn't return anything?
20:48:09gradhavar foo = proc() = echo "foo"
20:48:12gradhafoo()
20:56:05reactormonk http://sprunge.us/UNFZ
20:56:08reactormonkhm
20:56:53gradhamaybe that doesn't work in the repl, works for me in a source file
20:58:17gradhayes, I can reproduce that in the interactive version, you will have to use a source file
21:45:55Araqgradha: I deliberately threw out 'cast' in tut1
21:46:11Araqpeople overuse it
21:47:02Araqthis low level stuff doesn't belong in tut1
21:47:54reactormonkAraq, maybe important for talking to C apis?
21:48:34AraqI don't recall tut1 dealing with the FFI ... :P
21:48:51reactormonkAraq, do I have to parse the argstring myself from the idetools?
21:49:07Araqwhat is the argstring?
21:49:18Araqyou mean the parameter list? if so then yes
21:49:21reactormonkyes.
21:49:39reactormonkgot me the compiler code for that?
21:50:58gradhawhy not throw out addr as well? I see no point in explaining how to get pointers if you can't transform them to their original self back
21:51:43Araqaddr is still in tut1?
21:51:53Araqsure, throw that out too then
21:52:49dom96hello
21:53:07Araqgradha, what about #317 ?
21:53:36Araqwe used to have a missing 'close' in that code but that should have been fixed months ago
21:54:01gradhaI don't even know what is failing, the test suite is a little bit cryptic
21:54:35gradhahow can I run that particular test case?
21:55:04Araqtester test tfile.nim iirc
21:55:11Araqtester.nim(138) callCompiler
21:55:13Araqosproc.nim(688) outputStream
21:55:14Araqos.nim(205) OSError
21:55:16AraqError: unhandled exception: Too many open files [EOS]
21:55:23Araqhow is that not clear? ;-)
21:56:23gradhawell, so the problem is not in the server test case but in the tester suite program? talk about obvious
21:58:09Araqthat's what I think, yes
21:58:39AraqI guess osproc still has some handle leak that only shows up for macosx
22:29:16gradhathe stack trace doesn't make sense with the error "too many open files", since it's pointing at a close. Why would close() raise the exception of too many open files?
22:30:05gradhaalso, does koch redirect output? I added echos to osproc but I'm not seing them
22:33:04gradhaah, no, wrong files
22:33:14gradhathat's why the echos weren't happening
22:50:55*XAMPP-8 joined #nimrod
22:55:12gradhaAraq: if you are on linux what does ulimit -a tell you about number of open files? if on windows, what's the open file limit there?
22:56:34dom96linux here: 1024
22:57:20gradhathe default on mac seems to be 256, when I reduce it to 30 the test suite fails earlier
23:04:43dom96startProcess looks quite complex
23:20:31*q66 quit (Quit: Quit)
23:23:10dom96hrm, "Go to definition" on one of the 'close' functions in osproc goes to the definition of TProcess
23:27:55dom96gradha: Doesn't the stack trace point at a open?
23:28:50gradhaI've added to https://github.com/Araq/Nimrod/issues/317 the most recent stacktrace
23:30:23dom96I suspect that the fact that the (input/output/error)Stream functions seem like fields makes it really easy to call them in a loop, creating a lot of file descriptors.
23:31:36dom96gradha: osproc.nim(688) outputStream is a call to open() from what I can see.
23:34:13gradhayes
23:34:35dom96I believe I may have found the bug
23:34:53dom96tester.nim:138
23:34:57dom96outp is never closed
23:35:20gradhaisn't it closed on line 148?
23:35:29gradhaor is that just closing "the parent"?
23:36:56dom96PFileStream.close exists
23:37:03dom96and calls close on the TFile
23:37:08dom96please try closing 'outp'
23:37:24dom96after the 'close(p)' call
23:38:48dom96Araq: IMO this (input/output/error)Stream business is bad API design :P
23:38:50gradhaargh, ulimit doesn't let me compile now
23:39:04Araqdom96: why?
23:39:16Araqit doesn't open anything
23:39:38dom96it does
23:39:43dom96It opens a TFile
23:39:50Araqand the close of TProcess is supposed to close everything that's necessary
23:40:27dom96I recall calling outputStream in a loop and it failed with the "Too many open files" error.
23:40:44Araqlol
23:40:50Araqgood you never fixed it :P
23:41:07dom96I think I mentioned it to you :P
23:43:01dom96But if I didn't, I apologise.
23:43:34gradhaI'm running the test suite with the diff I added to https://github.com/Araq/Nimrod/issues/317 and seems to work
23:43:52gradhaI'm running with ulimit -n 10 and it has well gone past the previous runs
23:44:12dom96great
23:44:13Araqcool
23:44:40dom96So we should get the TProcess object to store these streams or something like that.
23:44:41AraqI'd never imagined that wrapping the stream in a TFile uses up another file handle
23:44:49Araqdom96: true
23:44:58Araqand it should all be closed when you close the process
23:45:05dom96yep.
23:48:43gradhawhile searching for this bug I found it actually worrying that you can have the open/close functions for a type in different files
23:49:11gradhait will really help if the doc tool will generate information related on type
23:49:24gradhaor if the idetools would allow scanning for something like this
23:50:32*gradha quit (Quit: Leaving)